If your find doesn't support prune or maxdepths, perhaps you can modify this. The following one-liner lists all the filenames in the current working directory only. One caveat — this method is terribly inefficient because find still forces a check of the entire directory tree structure. (For Solaris, use nawk instead of awk.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.