Finding stuff in linux

find / -type f -iname “”

find / -type d -iname “ibdata1”

find / -type f -iname “*arcconf”

grep -R ‘AllowNoPassword’ /

egrep ‘User’ /etc/apache2/apache2.conf

grep DocumentRoot /etc/apache2/apache2.conf

To find files larger than 100MB, use this command:
find / -type f -size +100000k -exec du -h {} \;

Search within files for specific text:

grep –exclude-dir={dir1,dir2,*.dst} -rnw ‘</path/to/somewhere/>’ -e “<pattern/text>”

grep –exclude-dir={/sys} -rnw ‘/etc’ -e “debug.log”

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *