Linux equivalent to QNX's ws (walk directory structure) command?
Allen Taylor
agtnews-PeCUgM4zDv73fQ9qLvQP4Q at public.gmane.org
Thu Jan 5 05:44:03 UTC 2006
On Thu, Jan 05, 2006 at 12:36:31AM -0500, Allen Taylor wrote:
> On Wed, Jan 04, 2006 at 10:13:46AM -0500, bob wrote:
> > QNX had a command which would walk down a directory structure executing a
> > command at each level. They called it "ws".
> >
> > Is there an equivalent in Linux?
>
> I think that the find will do this for you:
> find [search criteria] -exec somecommand {} \;
>
> Simple working example:
> find -exec ls -l {} \;
> will list each file and directory under the current location.
>
> As usual 'man find' or equiv.
>
> [ It's been a while since I did a "ws" in QNX - long enough that I was
> booting from 5 1/4 disks! ]
Of course I answered before noticing that two others had already
answered with better comments than mine! Then on top of it, I left out
the "-type d" *and* documented correctly as processing "each file and
directory" when the request was to process directories only. I'm going
to bed early tonight - obviously the brain has already shut down!
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list