View Full Version : File search

02-12-2008, 09:59 AM
File search
find / -name file1 search file and directory into root filesystem from '/'

find / -user user1 search files and directories belonging to 'user1'

find /home/user1 -name \*.bin search files with '. bin' extension within directory '/ home/user1'

find /usr/bin -type f -atime +100 search binary files are not used in the last 100 days

find /usr/bin -type f -mtime -10 search files created or changed within 10 days

find / -name \*.rpm -exec chmod 755 {} ; search files with '.rpm' extension and modify permits

find / -xdev -name \*.rpm search files with '.rpm' extension ignoring removable partitions as cdrom,
pen-drive, etc.…

locate \*.ps find files with the '.ps' extension - first run 'updatedb' command

whereis halt show location of a binary file, source or man

which halt show full path to a binary / executable