• RSS
  • SmsJobs
  • Sms
  • GoogleBuzz
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
The Linux Juggernaut

The Linux Juggernaut

roles on……

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.

How to view/list only directories in Linux?
Ans :
This can be achieved in two ways
1. Through ls command
2. Through find command

With ls we have to use grep to get the directory listings.
Ls –l grep ^d

Example :
[root@test surendra_a]# ls -l grep ^d
d——— 2 surendra_a surendra_a 4096 Sep 8 09:54 HTWFAIP
drwxrwxr-x 2 surendra_a root 4096 Nov 27 12:30 LinuxCBT – RHEL5
drwxrwxr-x 2 surendra_a root 4096 Oct 12 16:40 Software
[root@test surendra_a]#

With find we can have more controle on how to display only directories.

A. To display all the directories and sub-directories in present directory
#find . -type d

B. Displaying only directories in present directory
#find /root/ -type d –maxdepth 1

C. Displaying just directories in present directry and its sub-directories
#find /root/ -type d –maxdepth 2

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.
bySurendra On Saturday-January - 23 - 2010

email newsletter

Linux_theme_of_the_month

Introducing theme of

Update1:As of now we started with RHCE concepts and in future we ...

Linux Bash Shell sho

This is a small post on improving your productivity when working with ...

Up coming posts on D

We are very much happy to announce that we started posting on ...

Wishing you Happy an

Dear Friends/Readers, I take this opportunity to convey our sincere thanks ...

sticky bit unix, unix sticky bit, suid, linux sticky bit, sticky bit in unix, sticky bit aix, sticky bit chmod, sticky bits, sticky bit linux, suid sgid sticky bit, set sticky bit, stickybit, sticky bit permission, setting sticky bit, solaris sticky bit, sticky bit solaris, sticky bit directory, remove sticky bit, ubuntu sticky bit, sticky bit t, aix sticky bit, sticky bit load balancer, directory sticky bit, umask

What is a sticky Bit

What is a sticky Bit and how to set it ...

SGID_Linux

What is SGID and how

What is SGID and how to set SGID in Linux/Unix? This ...

  • About Linux Juggernaut

    How the blog name selected? Juggernaut: * a massive inexorable force that seems to crush everything in its way ...readmore>>

  • Contact Me

    Contact us Send an Email Phone number and vCard LinkedIn profile Advertise with us
  • About Me

    Surendra Kumar Chowdary

    My name is Surendra Kumar Anne. I am from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present i work at Persistent Systems as Module Lead.   read more »