[ug-bosug] 'find' -maxdepth alternate

Anil Gulecha anil.verve at gmail.com
Mon Jan 22 09:34:26 PST 2007


Hi list,

I'm working on the USB session manager for Belenix, and for a part of the
script I need to print out the files in the mentioned directory.

For Ex:
# find /tmp/parentdir/
/tmp/parentdir/
/tmp/parentdir/childdir1
/tmp/parentdir/childdir1/file
/tmp/parentdir/childdir2
/tmp/parentdir/childdir2/file
/tmp/parentdir/childdir3
/tmp/parentdir/childdir3/file
/tmp/parentdir/file1
/tmp/parentdir/file2
/tmp/parentdir/file3
# find /tmp/parentdir/ -type f
/tmp/parentdir/childdir1/file
/tmp/parentdir/childdir2/file
/tmp/parentdir/childdir3/file
/tmp/parentdir/file1
/tmp/parentdir/file2
/tmp/parentdir/file3

I'm trying to figureout somehting that'll only print out:
# find <mystery options>
/tmp/parentdir/file1
/tmp/parentdir/file2
/tmp/parentdir/file3

GNU find has the -maxdepth option, and I'm unable to find it on the solaris
find

Regards
Anil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.opensolaris.org/pipermail/ug-bosug/attachments/20070122/b8527c19/attachment-0002.html 


More information about the ug-bosug mailing list