Solved

A command to show the directory structure

Posted on 1998-07-01
9
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

734 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