The UNIX and Linux Forums  

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.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Possible to give sudo access to subdirectories? LordJezo UNIX for Dummies Questions & Answers 3 03-26-2008 03:47 PM
Find all files created by a specified user in a directory and its subdirectories abhilashnair UNIX for Dummies Questions & Answers 5 06-13-2007 03:37 AM
How to find a file in subdirectories? ALon UNIX for Dummies Questions & Answers 3 01-20-2007 02:26 PM
find files with a perticular year of access pradeepmacha UNIX for Advanced & Expert Users 3 07-12-2005 04:31 AM
Need help to access/mount so to access folder/files on a Remote System using Linux OS S.Vishwanath UNIX for Dummies Questions & Answers 2 07-30-2001 09:17 AM

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 05-04-2007
bobk544 bobk544 is offline
Registered User
  
 

Join Date: Jan 2006
Location: fairfax virginia
Posts: 58
find . but not access subdirectories

Hello,

I'm trying to figure out how to prevent this find command from accessing this diretories's subdirectories!

I tried the maxdepth and prune but they don't seem to work on SUN. So now i'm trying to set up a nawk command to not process any files that have "REVISED" in there name:

find . -name "???CQ???.TXT.out" | nawk ~/REVISED/ '{print $1}'

Thanks very much for any help with the find or the nawk commands!

BobK
  #2 (permalink)  
Old 05-04-2007
2dumb 2dumb is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 40
Can you just simply use the following?

ls ???CQ???.TXT.out
  #3 (permalink)  
Old 05-04-2007
bobk544 bobk544 is offline
Registered User
  
 

Join Date: Jan 2006
Location: fairfax virginia
Posts: 58
well i have that same file name ???CQ???... in the parent and sub/child directories, so i want to prevent the child directory file names from being printed.

when i use the ~/REVISED/ it seems to me that should cause the /REVISED/ or child directories to not be printed, so what would the syntax then be to say:

don't print any file name with /REVISED/ in it?

Thanks
BobK
  #4 (permalink)  
Old 05-04-2007
bobk544 bobk544 is offline
Registered User
  
 

Join Date: Jan 2006
Location: fairfax virginia
Posts: 58
ok got it thanks alot!

find . -name "???CQ???.TXT.out" | awk '$1!~/REVISED/{print $1}'

its the !
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 12:38 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