Monday, August 9, 2010

Find command to search for files and folders

Find command is used to find or search for a particular files or folder or prints out contents of entire folder or look for files or folders containing then names which you pass along with command. Its usage are as follows :

Looks for all the files and folders of current directory :

           
  find .  

note : find is followed by a dot (.) , here dot represents the current directory .

Files or folders containing particular name :

           
  find  -name  -print  FileName/ FolderName/ FileName(s)  

Example :

To find all files with (.dbc) extension :

           
  find  -name  -print  *.dbc  

Note : (*) is a wildcard character which displays all files with a particular name or extension.

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails
Make Money Blogging