Unix/Linux: Easily find or search files or directories
Newbie unix guys like me need to know these kinda things. This explains how to find a file or directory from the command line.
- Yeah, it’s the unix version of dos’s dir/s
I’m no unix guru, but maybe this will help somebody.
When searching for a file or folder you can use the following commands…
To search the current directory and all subdirectories for a folder or file, use the following command:
find . -name filename
[list] – where filename is the file or folder for which you are looking…
To search one directory all all its subdirectories use the following command:
find foldername -name filename
- – where filename is the file or folder for which you are looking and foldername is the folder in which you want to search









Dennis Quek said on February 2, 2009
Oh god thanks… this is so much clearer than other sites.. some examples will be good.
Arjun said on September 22, 2009
Thanks – top tip :)
Anonymous said on February 11, 2010
All the help I see is to search for files. What if I want to search a file or multiple files for a value or text in those files?.