![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| performing cleanup when a job finishes | ChicagoBlues | Shell Programming and Scripting | 4 | 03-06-2008 09:41 AM |
| making a recursive find more useful.. | spanish_tony | UNIX for Dummies Questions & Answers | 3 | 03-14-2007 02:48 AM |
| find file with date and recursive search for a text | rosh0623 | UNIX for Advanced & Expert Users | 10 | 08-16-2006 11:27 AM |
| performing a task at regular intervals | mridula | High Level Programming | 2 | 11-14-2005 02:26 AM |
| Question: non-recursive find syntax | alexkav | UNIX for Dummies Questions & Answers | 6 | 03-10-2005 04:46 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
use the find command with -xdev option
eg find / -name (search file) -xdev |
|
#3
|
|||
|
|||
|
Ur problem is that U had not gone the man pages of find
Please make sure U read the help pages of find . Acctually find ->> utility recursively descends the directory hierarchy for each path seeking files that match...... so please checkout with UNIX man pages and try it it would fun if U could use grep or fgrep with find .... Please try it and reply
__________________
psera |
|
#4
|
||||
|
||||
|
The xdev option will work only if all of his subdirectories are mount points. Not exactly a general solution.
If want to keep find in one directory, replace find dir ... with: find dir \( ! -name dir -prune \) ... So find . -type d -print will list each subdirectory all the way down your directory structure. But: find . \( ! -name dir -prune \) -type d -print will list only the subdirectories in the current directory. |
||||
| Google The UNIX and Linux Forums |