UNIX/Linux: Easily Find or Search Files or Directories
If you are new to Linux, you may find shortcuts like this one helpful. This tutorial explains how to find a file or directory from the command line.
- Note: This is the UNIX version of DOS’s dir/s.
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
- – where “filename” is the file or folder for which you are looking
To search one directory and 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
Follow the reactions below and share your own thoughts.