LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2007, 02:41 PM   #1
arunksit
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Rep: Reputation: 0
linux command to display only directories


anyone please tell me the linux command to display only the directories.(any options with ls or something like that...)
 
Old 05-14-2007, 03:06 PM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 448

Rep: Reputation: 37
This is a nice thread with some suggestions.
 
Old 05-14-2007, 06:22 PM   #3
inspiron_Droid
Member
 
Registered: Dec 2006
Distribution: Debian (Wheeze)
Posts: 391

Rep: Reputation: Disabled
Have you tried ls -d.
 
Old 05-15-2007, 04:57 AM   #4
jithin1987
LQ Newbie
 
Registered: May 2007
Location: Bangalore
Distribution: Arch
Posts: 6

Rep: Reputation: 0
ls -l | grep ^d
This will do.....
 
Old 05-15-2007, 05:52 AM   #5
inspiron_Droid
Member
 
Registered: Dec 2006
Distribution: Debian (Wheeze)
Posts: 391

Rep: Reputation: Disabled
You could also do dir which would give you a list of all files an directpries.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
directories first in ls display? gjhicks Linux - Newbie 9 07-15-2009 01:51 PM
Linux Command login screen, Display Script? roclok Linux - Software 2 06-14-2006 01:22 AM
linux command : read/display the line n xeebeeeeeee Programming 3 03-26-2006 06:08 AM
I want ls to not display contents of directories GameboyHippo Linux - Newbie 2 01-26-2004 04:47 AM
Display wide listing of files and directories only? northfield Linux - General 3 08-21-2002 07:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration