

To search for a file named e.g “softwares” under current directory, use the following command in Terminal: $ find. To search for files in a current directory, use $ find. The general syntax would be: $ find /path/to/file/įor instance, to find all the files under the /home/tin/Downloads/ directory, launch the Terminal by pressing Ctrl+Alt+T and then run the following command in Terminal: $ find /home/tin/Downloads/ You can use the Find command to search for all files in a specific directory.

The general syntax of the command is: $ find /path/to/file/ -iname filename It is a very powerful but slower search tool. You can combine these multiple conditions in a one Find command. Using the Find command you can search based on file and folder name, creation date, modification date, and permissions. It is a very helpful tool when searching a file for which you do not remember the name of the file. Method 1: Using Find commandįind is a highly flexible command used to search files based on a variety of conditions. We will use Ubuntu 20.04 LTS for describing the procedure mentioned in this article. Find is a slower method but contains several search conditions while Locate does not include as many conditions but is much faster than the Find. On the shell, there are three well-known ways for searching for files:įind and Locate commands are used to search for the files in the system while grep is used to search file based in the text that it contains.
Search all files for text mac how to#
This tutorial will show you how to use the Terminal, which is the command-line program in Ubuntu OS, to find files. If you can’t find your files, you must use command-line programs on Linux to look for them. However, in some situations, you will only have access to the command line terminal, particularly if you manage servers or use SSH to access the system. Many GUI programs allow you to search for files while working under Linux, independent of distribution. One typical issue when working with computers is that you can’t find the files you’ve saved somewhere.
