The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-23-2008
Prateek007 Prateek007 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 18
Question How to come out of this

Hi,

i have to search for all files named FILE in my particular directory, which is /abc.

when i am using 'find /abc -newer file2 -print | xargs ls -ld | grep 'FILE'

this gives me all the files but the problem is, it takes all the files which comes under /abc/def also and all other diirectory for the same file name FILE.

i want to restrict my search to this particular directory, and i need all FILE under only /abc, not /abc/def

can someone please guide me on this.
  #2 (permalink)  
Old 11-23-2008
Autocross.US's Avatar
Autocross.US Autocross.US is offline
Registered User
  
 

Join Date: Nov 2008
Location: Chesapeake, VA
Posts: 73
have a look at the '-prune' option in the find man page
  #3 (permalink)  
Old 11-23-2008
Prateek007 Prateek007 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 18
it works ,

thanks so much
Sponsored Links
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 07:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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