The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"find command" to find the files in the current directories but not in the "subdir" swamymns Shell Programming and Scripting 9 07-22-2008 08:23 AM
Running command "md5" on remote host not working. ynilesh UNIX for Advanced & Expert Users 1 02-01-2008 04:15 AM
bash: cd command to access "strange" directories robotronic Shell Programming and Scripting 3 07-06-2007 01:35 PM
Unix "at" / "Cron" Command New Problem...Need help Mohanraj UNIX for Dummies Questions & Answers 3 01-26-2006 04:08 PM
chmod 777 on all directories below...how do I do that using the "find" command? Neko UNIX for Dummies Questions & Answers 7 07-12-2001 06:58 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2006
Registered User
 

Join Date: May 2006
Location: Hyderabad, India
Posts: 12
Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-11-2006
Playing with Ubuntu Now!
 

Join Date: Oct 2005
Location: Chennai
Posts: 364
see man

see what man tells -
-d If an argument is a directory, list only its name (not its
contents); often used with -l (ell) to get the status of a
directory.
So, by default the argument is taken as the current directory. To list all directories, ls -ld */
Reply With Quote
  #3 (permalink)  
Old 05-12-2006
Registered User
 

Join Date: May 2006
Posts: 1
To list all the directories in the current working directory we should be using ls -ld for directories.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0