Unix shell: list directories only

A simple question with the answer not so simple to find.
For a current directory:

lexus@lexus:~$ ls -dl */
drwxr-xr-x 16 lexus lexus 4096 Apr  1 16:16 KAZANTSEV/
drwxrwxr-x  3 lexus lexus 4096 Aug  5  2013 Storage/
drwxrwxr-x  2 lexus lexus 4096 Feb  9  2012 Ubuntu One/
drwxr-xr-x 11 lexus lexus 4096 Jan  3 17:14 VirtualBox VMs/
drwxrwxr-x  2 lexus lexus 4096 Jun 10 17:09 dbn/
drwxr-xr-x  2 lexus lexus 4096 Jan 10 10:41 dwhelper/
drwxr-xr-x  3 lexus lexus 4096 May  2  2012 fluxmenu/
drwxr-xr-x  2 lexus lexus 4096 Feb  5 15:28 fontconfig/
drwxrwxr-x  2 lexus lexus 4096 Apr 18 17:24 images/
drwxr-xr-x  6 lexus lexus 4096 Oct 31  2013 sipvicious-0.2.8/
lexus@lexus:~$ 

For some other directory:

lexus@lexus:~$ ls -dl /tmp/*/
drwx------ 2 lexus lexus 4096 May 30 07:08 /tmp/CRX_75DAF8CB7768/
drwx------ 2 lexus lexus 4096 Jun 26 12:23 /tmp/acroread_1000_1000/
drwxr-xr-x 2 lexus lexus 4096 Jun 18 16:52 /tmp/hsperfdata_lexus/
drwx------ 2 lexus lexus 4096 Jun 25 18:36 /tmp/libgksu-lBNuPo/
drwx------ 2 lexus lexus 4096 Jun  6 14:57 /tmp/mc-lexus/
drwx------ 2 lexus lexus 4096 Jan  1  1970 /tmp/orbit-lexus/
drwx------ 2 root  root  4096 Jan  1  1970 /tmp/orbit-root/
drwx------ 2 lexus lexus 4096 Jun 11 16:48 /tmp/plugtmp/
drwx------ 2 lexus lexus 4096 May 26 17:59 /tmp/ssh-ftcIDV2jxXYG/
drwx------ 2 lexus lexus 4096 May 26 17:59 /tmp/ssh-tzuelndrwY3i/
lexus@lexus:~$

Tags:

Comments are closed.