?
Solved

I want to list ONLY the directories ( not the files ) recursively with ls -R

Posted on 2010-01-02
4
Medium Priority
?
217 Views
Last Modified: 2013-12-06
I want to knows my directory tree

The command I wish worked would be ls -Ld but it does not.

I would really help with the /proc direcory :)

0
Comment
Question by:TIMFOX123
  • 2
4 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1332 total points
ID: 26161662
I think the best option would be using find.

find /proc -type d -ls
0
 
LVL 7

Assisted Solution

by:vikas_madhusudana
vikas_madhusudana earned 668 total points
ID: 26161743
ls -lr | grep dr
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1332 total points
ID: 26161766
vikas_madhusudana,

neat idea, but you should use grep "^dr" (start of line)
0
 

Author Closing Comment

by:TIMFOX123
ID: 31671949
Works for me.


Thank you very much.

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question