LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to find unique extensions or formats in a deep folder structure (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-find-unique-extensions-or-formats-in-a-deep-folder-structure-891043/)

threezerous 07-11-2011 03:47 AM

Trying to find unique extensions or formats in a deep folder structure
 
I have a deep folder structure on my RHEL 5.x file system which is supposed to have only word(*.doc, *.docx) or pdf(*.pdf) files. But I want to check if there are files with any other extensions which exist. Is that possible?

Thanks in advance

colucix 07-11-2011 03:55 AM

Code:

find /path/to/folder -not \( -iname \*.doc -o -iname \*.docx -o -iname \*.pdf \)

TobiSGD 07-11-2011 04:10 AM

In addition to colucix solution you will find more information on the find-command with
Code:

man find


All times are GMT -5. The time now is 04:44 AM.