![]() ![]() This command will search for block devices within the /dev directory. If you want to find block devices, such as hard drives or partitions, you can use the following command: find /dev -type b ![]() This command will search for symbolic links within the / usr/local directory. To search for symbolic links within a specific directory, use the following command: find /usr/local -type l If you’re interested in finding directories only in your current location, you can use the following command: find -type d To search for regular files (excluding directories, symbolic links, etc.) within the current directory and its subdirectories, use the following command: find -type f Searching for Directories: The file_type can be one of the following: Replace /path/to/search with the directory where you want to begin the search. Searching by file type: find /path/to/search -type file_type Replace /path/to/search with the directory path where the files are located or remove it if you are in the same directory where the file is available. To get more out of the ‘ find‘ command we can use additional options to refine our search results in the Ubuntu terminal. find -name "*.txt" 2: Using the ‘find’ Command with Additional Options Whereas, if you don’t know the exact file name but are aware of the extension it is using then we can list all such files using the wildcard:Įxample: It will list all files of the directory where you are searching with.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |