LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01: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, 02:06 PM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
This is a nice thread with some suggestions.
 
Old 05-14-2007, 05: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, 03: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, 04: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



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 12:51 PM
Linux Command login screen, Display Script? roclok Linux - Software 2 06-14-2006 12:22 AM
linux command : read/display the line n xeebeeeeeee Programming 3 03-26-2006 05:08 AM
I want ls to not display contents of directories GameboyHippo Linux - Newbie 2 01-26-2004 03:47 AM
Display wide listing of files and directories only? northfield Linux - General 3 08-21-2002 06:28 PM

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

All times are GMT -5. The time now is 07:59 PM.

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
Open Source Consulting | Domain Registration