LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2004, 01:26 AM   #1
ebasi
Member
 
Registered: Jul 2004
Distribution: Slackware 13.0
Posts: 49

Rep: Reputation: 15
find help


i would like to find some files in my system but I don't know how to exclude some directories from this search

example:
find /data/ -iname "*.mp3" -or -iname "*.mpg" -or -iname "*.avi" -or -iname "*.exe" -or -iname "*.mpeg" -or -iname "*.asf" -or -iname "*.wmv" -or -iname "*.wma" -type f

I don't want to search in /data/download/
Help me please!
 
Old 07-16-2004, 01:56 AM   #2
free_ouyo
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Ubuntu
Posts: 133

Rep: Reputation: 15
Re: find help

Hello,

You can use the grep command like :

find /data/ -iname "*.mp3" -or ... "*.wma" -type f | grep -v "^/data/download"

Hope this help

Free_ouyo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux find to find files with multiple patterns subu_s Programming 6 12-15-2010 12:15 AM
Can`t find C-compiler in Debian ,or at least can`t find one that can make executables hemmelig Linux - Software 4 05-26-2008 03:07 AM
I can find the camera but can't find the images? sneckert Linux - Newbie 2 02-02-2005 08:51 AM
find: . changed during execution of find suse degraffenried13 Linux - General 3 12-12-2004 07:13 PM
linux 'find' to find text files subu_s Programming 2 12-02-2004 02:56 AM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration