Search This Blog

Monday, August 9, 2010

Find Command.

Usage:
1)Find a file or folder with their name.


Following command comes handy when you forget the location of file or folder with their exact name.


Following command will search file or folder named mnt throughout the filesystem.


#find / -name mnt


If you are searching for a directory and not a file it would be better if you use a type filter as below.

#find / -type d -name mnt
/mnt

Similarly,
If you are searching for a file and not a directory it would be better if you use a type filter as below.

#
find / -type f -name mnt
(note : Since there is no file with name as mnt nothing will get displayed)

No comments:

Post a Comment