UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 7th, 2005, 08:15 PM
hope.sandoval's Avatar
hope.sandoval hope.sandoval is offline
At night, the ice weasels come
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2005
Posts: 1,047 hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 13 h 4 m 49 sec
Reputation Power: 52
Excluding certain filetypes from FIND

As I type this I have a FIND running in another window. It's been going for quite some time because of the huge number of images stored on the server. I'm not very good at figuring things out from MAN pages (maybe if they were WOMAN pages... ) so I'm asking here if someone can show me ho I would modify my find to exclude jpg's and gif's.

Here's what I currently use:
find "some term" * -print

Any help appreciated.

Reply With Quote
  #2  
Old September 8th, 2005, 07:46 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Pass your output through an inverted grep (e.g. - you supply a pattern, it tells you what DOESN'T match the pattern) using a pipe. The grep switch for inversion is '-v'.

Reply With Quote
  #3  
Old September 8th, 2005, 08:00 PM
hope.sandoval's Avatar
hope.sandoval hope.sandoval is offline
At night, the ice weasels come
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2005
Posts: 1,047 hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level)hope.sandoval User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 13 h 4 m 49 sec
Reputation Power: 52
Thanks, I'll give it a try.

Reply With Quote
  #4  
Old September 9th, 2005, 01:52 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 20 m 49 sec
Reputation Power: 48
find also supports the ! operator (meaning "not" ) like this
Code:
find /path ! -name \*.jpg ! -name \*.gif
Comments on this post
stdunbar agrees: Excellent suggestions!

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Excluding certain filetypes from FIND


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT