Finding files or directories - Linux Views : 357
Tagged in : Linux
0 0
Send mail
Finding files or directories

To locate the file 'filename', searching all the subdirectories of the current directory:

find . -name 'filename'



You can use a pattern in place of 'filename', e.g. to return the list of all .doc files in the current directory and its subdirectories:

find . -name '*.doc'



The 'find' command can do much more. For example, to find the files that were accessed yesterday:

find ~ -daystart -type f -atime 1



Consult 'info find' for more information.

By Sanju, On - 2009-11-11



    Login to add Comments .