home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ulowell!m2c!nic.umass.edu!dime!williams
- From: williams@cs.umass.edu
- Newsgroups: comp.unix.questions
- Subject: Sun 'find' is missing '-maxdepth'!
- Message-ID: <59161@dime.cs.umass.edu>
- Date: 26 Jan 93 17:54:59 GMT
- Sender: news@dime.cs.umass.edu
- Organization: COINS, UMass, Amherst
- Lines: 25
-
- The find program on Sun OS does not contain the -maxdepth option. How
- can I get the effect of -maxdepth 1 in a directory containing
- subdirectories? I want find to -exec a command on all of the files in
- the directory, but NOT on the files contained in the subdirectories.
- If I use -prune, nothing is done since the file I'm specifying is a
- directory. I've tried various combinations of -prune, -depth, and
- -type to no avail.
-
- /dira/dirb/file1
- file2
- file3
- file4
- dirc/
- file5
- file6
- file7
-
- 'find /dira/dirb -print -maxdepth 1' does what I want - prints file1
- thru file4, but not file5 thru file7.
-
- How can I do the same thing on the current version of Sun OS on a
- Sparc 2?
-
- Thanks for any help!!
- Leo
-