LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

"find" files of multiple extensions, on one or more directories, excluding multiple subdirectories

Posted 12-07-2019 at 12:43 PM by the dsc (linux-related notes)
Updated 12-07-2019 at 12:47 PM by the dsc

It took me quite a while to find the correct syntax, only after some dozens of attempts that only worked partly right:

Code:
 find "${PWD}" "/optionally/any/other/path/"  \( -path '*/\.*' -o -name '*notthisfolder*' -o -name '*northis*' -o -wholename "*oteven/thi*" \) -prune -o -iname '*.ext1' -o -iname "*.ext2" -o -iname "*.ext*nsion3"
Where '*/\.*' excludes hidden folders (also files, I guess). All the patterns between the...
Member
Posted in Uncategorized
Views 1792 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 02:34 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration