-R
, do:grep -R 'string' dir/
If not, then use find
:find dir/ -type f -exec grep -H 'string' {} +
Example is better than percept
-R
, do:grep -R 'string' dir/
If not, then use find
:find dir/ -type f -exec grep -H 'string' {} +
Recently I tried to install Redhat Linux in Virtualbox, however I got the below error.
By default the hard drive I created was a SATA HD, the workaround is to create a IDE hard drive instead and make it as Primary Master ID. This could be a bug in Virtualbox
I bought a TL-WA801ND router with version 2.1, unfortunately DD-WRT doesn't support it and OpenWRT only support version 1. After a few hours googling and retrying, I finally had the OpenWRT installed onto the router.
Thanks to TasksOfOhm who provided an awesome tutorial and binaries for TL-WA801ND. Please refer to the below link for more information:
/usr/lib/lua/luci/dispatcher.lua:284: No valid theme found
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:284: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function
I was trying to build my project with Gradle in Android Studio, then I had the above error.
To resolve this I had to use the Android SDK Manager to install "Android Support Repository". After that the project was rebuilt successfully.
If you have Google Apps Sync installed to download the emails from Google Mail and you are not able to search the emails, the method below may help you to resolve the problem:
Environment: Windows 7 + Outlook 2010
Problem: Try to use the search box within Outlook to search the emails, it
keeps giving nothing and the index status is showing nothing to be indexed
This error message told us that there is no disk space left on /var
When we run "df -h" on the system we get:
[root@A5AFETTASB pats]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 3.0G 1.7G 1.2G 59% /
/dev/cciss/c0d0p1 99M 15M 80M 16% /boot
/dev/cciss/c0d0p6 24G 5.9G 17G 27% /opt
none 1.3G 0 1.3G 0% /dev/shm
/dev/cciss/c0d0p5 2.0G 1.1G 790M 59% /var
Seems like only 59% disk space is used but that is not true. As the difference here is MB of space versus the almighty inode. So if we try using "df -i", we get:
[root@A5AFETTASB pats]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/cciss/c0d0p3 393600 95644 297956 25% /
/dev/cciss/c0d0p1 26104 40 26064 1% /boot
/dev/cciss/c0d0p6 3123232 12620 3110612 1% /opt
none 322278 1 322277 1% /dev/shm
/dev/cciss/c0d0p5 262144 262144 0 100% /var
Further investigation showed, there are huge number of files created under /var/spool/clientmqueue that caused the problem:
[root@A5AFETTASB pats]# du -h /var/spool/*
4.0K /var/spool/at/spool
8.0K /var/spool/at
1.1G /var/spool/clientmqueue
12K /var/spool/cron
4.0K /var/spool/cups/tmp
8.0K /var/spool/cups
4.0K /var/spool/lpd
8.0K /var/spool/mail
4.0K /var/spool/mqueue
4.0K /var/spool/repackage
4.0K /var/spool/rwho
4.0K /var/spool/samba
4.0K /var/spool/up2date
4.0K /var/spool/vbox
If you don't care about the content you can simply delete the files, but
you should ask yourself why you have tons of messages in that
directory.
# rm -rf /var/spool/cilentmqueue
# mkdir /var/spool/cilentmqueue
# chown smmsp:smmsp /var/spool/cilentmqueue
If the emails are the result of crontab, below will explain how to disable it:iptables -A INPUT -s IP-ADDRESS -j DROP
Replace IP-ADDRESS with your actual IP address. For example, if you wish to block an ip address 65.55.44.100 for whatever reason then type the command as follows:
# iptables -A INPUT -s 65.55.44.100 -j DROP
# iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP
# iptables -A INPUT -s 65.55.44.100 -j DROP
# service iptables save
# iptables -D INPUT -s xx.xxx.xx.xx -j DROP
# iptables -D INPUT -s 65.55.44.100 -j DROP
# service iptables save
2009 ·Coding Life by TNB