The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find duplicates from multuple files with 2 diff types of files ricky007 Shell Programming and Scripting 2 03-04-2008 01:46 PM
Find files in directory and its subdirectory jyotib Shell Programming and Scripting 11 01-24-2008 04:19 PM
find the 5o largest files in a directory igidttam Filesystems, Disks and Memory 8 05-16-2007 02:20 PM
find files and copy into a directory balireddy_77 Shell Programming and Scripting 4 04-27-2007 04:38 AM
How to find the count of files in a directory sish78 UNIX for Dummies Questions & Answers 5 02-01-2007 03:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-13-2004
dangral dangral is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2002
Posts: 699
find directory with 2 types of files

Trying to use the find command to find any directory which contains a file ending in .zip AND a file ending in .o

I'm having trouble specifying multiple files as criteria and have can't seem to figure it out from Unix in a Nutshell and Google.
  #2 (permalink)  
Old 10-13-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Example
Code:
SOURCE_DIR="some directory path"

find $SOURCE_DIR \( -name "*.pc" -o -name "*.C" -o -name "*.mak" \) -exec ls -1 {} \;
  #3 (permalink)  
Old 10-13-2004
dangral dangral is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2002
Posts: 699
exactly what I was looking for...I had been doing -name \( "*.zip" -a "*.o" \)
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0