Linux equivalent to QNX's ws (walk directory structure) command?

Allen Taylor agtnews-PeCUgM4zDv73fQ9qLvQP4Q at public.gmane.org
Thu Jan 5 05:36:31 UTC 2006


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 did a quick look through my reference material and couldn't find it,  so I 
> thought I would ask before I set out to write my own.

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!  ]

Allen
--
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