![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| help me out with find command , -prune option | bhuvaneshlal | UNIX for Dummies Questions & Answers | 7 | 09-08-2009 05:26 AM |
| doubt in -prune option | bhuvaneshlal | Linux | 0 | 08-21-2009 05:16 PM |
| correct usage of find's -prune option | ProGrammar | SUN Solaris | 6 | 04-29-2009 01:22 PM |
| find with prune option | highlt | UNIX for Advanced & Expert Users | 11 | 01-04-2007 11:29 AM |
| finding files using prune option | subodh.sharma | Shell Programming and Scripting | 1 | 11-02-2005 11:11 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
find with prune option
Hi, I want to list files only from the current dir and its child dir (not from child's child dir). i have the following files, Code:
./ABC/1.log ./ABC/2.log ./ABC/ABC1/A.log ./ABC/ABC1/B.log ./ABC/ABC1/XYZ/A1.log ./ABC/ABC1/XYZ/A2.log Here i want to list only the log file from current dir and ./ABC dir. ( not from ./ABC/ABC1 and ./ABC/ABC1/XYZ). Hence please someone help me to write a correct find command with -prune option. I beleive the following command will work in Linux find . -name "*.log" -maxdepth 1. But this command is not working in AIX. I'm not sure -maxdepth option is shell dependent or unix flavour variant. SO i tried find with -prune option but that is not giving me the desired result. (i'm not pretty sure if my find command with -prune option is correct) Last edited by zaxxon; 10-01-2009 at 02:03 AM.. Reason: code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|