On Friday 02 August 2002 12:08, Togan Muftuoglu wrote:
I can be brain dead but isn't "ls -d" suppose to show the directories only. When I give "ls-d all" I get back is nothing
toganm@earth:~/projects/sfnet/suse/faq_sgml> ls -ld drwxr-xr-x 7 toganm users 784 Aug 2 12:31
toganm@earth:~/projects/sfnet/suse/faq_sgml> ls -d .
This is the directory inode. -d lists the directory inode instead of the contents of that inode. It's useful when you want to look at the modes of a directory, for instance "ls -l /home/toganm" would list the files in your home directory, but "ls -ld /home/toganm" would list its properties. To list the entries in the directory inode that are themselves directories, I suggest something like ls -l|grep "^d" There may be other ways.
So why do I get nothing when I issue 'ls -d'
You do get something. You get the name of the current directory, which will always be '.' //Anders