Solved

A command to show the directory structure

Posted on 1998-07-01
9
313 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
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.

696 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