Wednesday, May 14, 2008

Linux : how to list directory only

To see a listing of all directories in current directory

  • ls -l | grep ^d ( this will show names with details )
  • ls -d */ ( will how names only )

If you want to see hidden directory also
  • ls -d .*"/" *"/"
  • find . -type d -exec ls -d {} \;
  • find . -type d

No comments: