Unix/Linux: Easily find or search files or directories

Contributor Icon Contributed by MickeyMouse Date Icon August 25, 2005  
Tag Icon Tagged: UNIX

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
Previous recipe | Next recipe |
 

 
close Reblog this comment
blog comments powered by Disqus