Labels

File search commandline

# find / -name file1
search file and directory into root filesystem from '/' [man]

# find / -user user1
search files and directories belonging to 'user1' [man]

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

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

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

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

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

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

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

# which halt
show full path to a binary / executable [man]