![]() $ find / -type d -name "apk" $ sudo find / -type d -name "apk" Suppose you want to find a directory named apk in the root file system, use the following command. -03: This level allows the find command to rearrange the search tests based on efficiency and the likelihood of success.-02: This one prioritizes the filename search and then runs the file type search.-01: This is the default optimization and the search is based on the file name.There are three optimization levels 01, -02, and -03 The find option uses optimization for enhancing performance. This will search the current directory and subdirectories upto X levels deep. This will search for files or folders which don’t match the test criteria. This option will list only folders and directories. This option will display the current file in the ls -dils format in the output screen. This will print the full name of the file in the output screen. This option ignores the case and performs a search which is case insensitive. It specifies the base of the file name that matches the shell pattern. The expression attribute will control the test that searches the directory hierarchy.The starting path attribute will specify the directory from where the find command should begin the search.The find command’s behavior and optimization methods are controlled by the options attribute.The dot (.) symbol indicates the current working directory.Ĭommon Syntax of Find Command $ find To display all files which are present in the current working directory use the following command. You can search for files by name, extension, group, modification date, permissions, etc. In simple words, the find command searches for a file in the current working directory and recursively through the subdirectories that matches the given search criteria. The find command helps us to look up for files for which we know only the approximate names. To overcome this issue find command is used. Therefore files that contain the same name in different directories are matched and displayed on the screen. From the output, it can be seen that the locate command will start searching from the root directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |