

In this guide, we covered a simple yet helpful find utility trick to enable us find multiple filenames by issuing a single command. When you critically observe all the commands above, the little trick is using the -o option in the find command, it enables you to add more filenames to the search array, and also knowing the filenames or file extensions you are searching for.
#Ubuntu find file pdf#
pdf extensions: # find /home/aaronkilik/Documents/ -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.deb" -o -name ".pdf" \)įind More than 3 File Extensions in Linux

Here is another example where we search for files with. c extensions, issues the command below: # find. It is recommended that you enclose the file extensions in a bracket, and also use the \ ( back slash) escape character as in the command.Ģ.

txt file extensions, you can do this by running the command below: # find. Find is a powerful search tool for the Linux desktop. Assuming that you want to find all files in the current directory with. As explained in the previous command and options list, if you want to remove a directory rather than a file, you need to replace the f with a d after the -type option as shown in the following image: find. Let us proceed to look at some examples of find command in Linux.ġ.
