Re: Simple sh or alias to list directories

2000-10-28 Thread Riku Saikkonen
Thomas Halahan [EMAIL PROTECTED] writes: On Tue, 17 Oct 2000, USM Bish wrote: I am on bash. This is part of the the output of the command ls -d */ on my home directory. Only the sub dirs are displayed. your solution is more elegant than what i have put together with a find call. however

Re: Simple sh or alias to list directories

2000-10-18 Thread Mikael Hedin
`find ~ -maxdepth 1 -type d' maybe? or define a function `function lsd() { find $1 -maxdepth 1 -type d ; }' HTH Micce -- Mikael Hedin, MSc +46 (0)980 79176 Swedish Institute of Space Physics +46 (0)980 73547 (home) S-Box 812, 981 28 KIRUNA, Sweden+46 (0)980 79050 (fax)

Re: Simple sh or alias to list directories

2000-10-18 Thread USM Bish
Sorry to be late in replying. I pick up mail once a day only. On your queiry on recursive dir AFAIK, using my technique NO! Essentially each */ represents one level of directory structure. It is possible to get the second level with ls -d */*/ and third level with ls -d */*/*/, but in

Simple sh or alias to list directories

2000-10-17 Thread Thomas Halahan
Hello, I am trying to determine an easy alias or sh script that will list only the directories in a directory. It should have similar functionality to the ls command. E.g. [tom]$ lsd ~ should list only the directories in my home folder, not the files. Does anyone know of a way to do this

Re: Simple sh or alias to list directories

2000-10-17 Thread Michael Stevens
On Tue, Oct 17, 2000 at 02:36:05PM +, Thomas Halahan wrote: Hello, I am trying to determine an easy alias or sh script that will list only the directories in a directory. It should have similar functionality to the ls command. E.g. [tom]$ lsd ~ should list only the directories in my

Re: Simple sh or alias to list directories

2000-10-17 Thread Timo Benk
On Tue, 17 Oct 2000, Thomas Halahan wrote: I am trying to determine an easy alias or sh script that will list only the directories in a directory. It should have similar functionality to the ls command. E.g. [tom]$ lsd ~ Try this one: --snip-- #!/bin/sh if [ $1 ]; then find $1

Re: Simple sh or alias to list directories

2000-10-17 Thread Carel Fellinger
On Tue, Oct 17, 2000 at 02:36:05PM +, Thomas Halahan wrote: Hello, I am trying to determine an easy alias or sh script that will list only the directories in a directory. It should have similar functionality to the ls command. E.g. [tom]$ lsd ~ should list only the directories in

Re: Simple sh or alias to list directories

2000-10-17 Thread Erik Steffl
note that it won't list links to directories, you might want to use -follow see below: panther:~/rrrl total 6 drwxr-xr-x 2 esteffl pbidev 512 Oct 17 09:15 dir lrwxrwxrwx 1 esteffl pbidev 3 Oct 17 09:15 dir.link - dir -rw-r--r-- 1 esteffl pbidev14 Oct 17 09:15

Re: Simple sh or alias to list directories

2000-10-17 Thread USM Bish
I am on bash. This is part of the the output of the command ls -d */ on my home directory. Only the sub dirs are displayed. aedes:~$ls -d */ Mail/ page/ nsmail/ bd4v605/free/ tklatex/ HTH alias lsd=ls -d */ should do your job ! USM Bish

Re: Simple sh or alias to list directories

2000-10-17 Thread Jeff Howie
I _LIKE_ IT (ie 'ls -d */')! :) Up 'til now I've been using: lld() { ls -l $@ | grep -E ^d return 0 } But your solution is much more elegant. thks.jeff On Tue, Oct 17, 2000 at 11:49:32PM +0518, USM Bish wrote: I am on bash. This is part of the the output of the

Re: Simple sh or alias to list directories

2000-10-17 Thread Thomas Halahan
Perfect, Thanks very much. I have just added a bit so that I can list directories recursively. E.g. lsd -R At present file ~/home/bin/lsd is --snip-- #!/bin/sh if [ $1 ]; then if [ $1 = -R ]; then MAXDEPTH= DIR=$2 #echo $1 MAXDEPTH = $MAXDEPTH fi else

Re: Simple sh or alias to list directories

2000-10-17 Thread Thomas Halahan
your solution is more elegant than what i have put together with a find call. however how could you get it to list recursively? i have tried ls -1 -R -d */ tom On Tue, 17 Oct 2000, USM Bish wrote: I am on bash. This is part of the the output of the command ls -d */ on my home directory.

Re: Simple sh or alias to list directories

2000-10-17 Thread Erik Steffl
using -d for this is confusing like hell because -d is 'well known' switch in standard unix ls - it lists directory as if it were file, i.e. does not list the content of the directory (useful with -l), it has no effect on files (they are listed just like they would be without -d) erik

Re: Simple sh or alias to list directories

2000-10-17 Thread kmself
On Tue, Oct 17, 2000 at 02:36:05PM +, Thomas Halahan ([EMAIL PROTECTED]) wrote: Hello, I am trying to determine an easy alias or sh script that will list only the directories in a directory. It should have similar functionality to the ls command. E.g. [tom]$ lsd ~ should list

Re: Simple sh or alias to list directories

2000-10-17 Thread Pollywog
On 17-Oct-2000 USM Bish wrote: I am on bash. This is part of the the output of the command ls -d */ on my home directory. Only the sub dirs are displayed. aedes:~$ls -d */ Mail/ page/ nsmail/ bd4v605/ free/ tklatex/ HTH alias

Re: Simple sh or alias to list directories

2000-10-17 Thread Dwayne C . Litzenberger
I use alias ld='ls -l | grep ^d' Many interesting ways of doing the same thing :) Just make sure you don't get that confused with the _real_ ld command (the GNU linker)! :-P -- Dwayne C. Litzenberger - [EMAIL PROTECTED] - Please always Cc to me when replying to me on the lists. - Please

Re: Simple sh or alias to list directories

2000-10-17 Thread Russell Davies
; --xHFwDpU9dbj6ez1V ; Content-Type: text/plain; charset=us-ascii ; Content-Disposition: inline ; Content-Transfer-Encoding: quoted-printable ; ; I use alias ld=3D'ls -l | grep ^d' ; =20 ; Many interesting ways of doing the same thing :) ; ; Just make sure you don't get that confused with the

Re: Simple sh or alias to list directories

2000-10-17 Thread Pollywog
On 18-Oct-2000 Dwayne C . Litzenberger wrote: I use alias ld='ls -l | grep ^d' Many interesting ways of doing the same thing :) Just make sure you don't get that confused with the _real_ ld command (the GNU linker)! :-P I never thought of that... I must change that alias. thanks --