Saturday, July 25, 2009

Search and Find

# which (Command/executable)
>> Full path to a binary / executable

# whereis (binary)
>> location of a binary file, source

# find /usr/bin -type f -mtime -7
>> search files created or changed within 7 days

# find / -name file1
>> search file and directory from '/'

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

# find /home/applmgr -name \*.fmx
>> search files with '. fmx' extension within directory '/ home/applmgr'

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

# find / -name *.fmb -exec chmod 755 '{}' \;
>> search files with '.fmb' extension and modify permissions

No comments:

Post a Comment