Solved

A command to show the directory structure

Posted on 1998-07-01
9
310 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
 

Expert Comment

by:slowe
ID: 1582905
you may use "ls -l|more" to obtain a directory listing.
0
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.

 

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

Suggested Solutions

Title # Comments Views Activity
SOFS cluser offline 3 40
Valid LIN protocol Protected ID values 1 20
What To Do With Surplus Rack Server, Controller and Switches? 13 22
EIGRP STUB 19 31
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now