Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ssc-vax!ray3rd From: ray3rd@ssc-vax.UUCP (Ray E. Saddler III) Newsgroups: comp.unix.wizards Subject: Re: Subdirectory listing Summary: Try out this little script... Keywords: directory tree subdirectory Message-ID: <2673@ssc-vax.UUCP> Date: 22 May 89 22:37:00 GMT References: <215@cs.columbia.edu> Distribution: usa Organization: Boeing Aerospace Corp., Seattle WA Lines: 94 In article <215@cs.columbia.edu>, olasov@cs.columbia.edu (Benjamin Olasov) asks: > > I'm interested in finding a unix command usage that will return the complete > path names of all subdirectories below a given directory, so that, given a > directory tree like this: > > ( Example deleted ) > > the command would take the directory of interest as its argument, as in: > > $ mycommand /files/home/users > > and return the subdirectories in the format: > > /files/home/users/user1 > /files/home/users/user2 > /files/home/users/user2/data > /files/home/users/user2/data/bin > /files/home/users/user3 > /files/home/users/user3/docs > /files/home/users/user4 > /files/home/users/user5 > /files/home/users/user6 > /files/home/users/user6/mail > /files/home/users/user6/hacks > > What's the easiest way to do this? > Give this script a spin around the block: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #!/bin/sh # if [ $# = 0 ] then echo "Usage: mycommand