Solved

A command to show the directory structure

Posted on 1998-07-01
9
312 Views
Last Modified: 2013-12-23
I want to know if there a command in UNIX like  the "tree" command  in DOS where you can see all the structure of your directory and subdirectories....

that' its

Thx in advance
0
Comment
Question by:tusken
9 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1582902
find . -print | perl -pe 's#[^/]*/#   #g'
0
 
LVL 10

Expert Comment

by:rbr
ID: 1582903
Another way if you don't have perl use
du.
If you want an output like DOS there is no such program. You have to write your own.
0
 
LVL 1

Expert Comment

by:agolan
ID: 1582904
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Expert Comment

by:slowe
ID: 1582905
you may use "ls -l|more" to obtain a directory listing.
0
 

Author Comment

by:tusken
ID: 1582906
The answer that suited the best my question is the one from OZO so i'll reopen my question and if ozo wants to answer it i'll give those points to him

For the others...... thx anyway!!!
0
 
LVL 84

Expert Comment

by:ozo
ID: 1582907
You seem to imply that there's room for the answer to be better suited.
Was there something you would have preferred to change?
0
 

Author Comment

by:tusken
ID: 1582908
No sorry (english is not my base language!!) i meant that your answer was the one i was looking for EXACTLY...so no it was alright... but if i would like just to have the directory and not all the file in it what would the command be like???

thx in advance ....and still learning unix AND english :-)


0
 
LVL 84

Accepted Solution

by:
ozo earned 50 total points
ID: 1582909
find . -type d -print | perl -pe 's#[^/]*/#   #g'
  or
du -r | perl -pe 's#[^/]*/#    #g'
  (which shows the tree backwards)
0
 

Author Comment

by:tusken
ID: 1582910
Thx a lot!!!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

860 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