Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

One liner to print a file system tree on UNIX like systems

by ciderpunx (Vicar)
on Aug 21, 2013 at 13:08 UTC ( #1050343=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ls -R | perl -ne 'if(/:$/){s/:$//;s/[^\/]*\//--/g;s/^-/\t|/;print}'
    
  2. or download this
    $ ls -R | perl -ne 'if(/:$/){s/:$//;s/[^\/]*\//--/g;s/^-/\t|/;print}'
        |---branches
    ...
        |-------Reader
        |-----Output
        |-------Writer
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://1050343]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-09-18 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (126 votes), past polls