Friday, June 11, 2010

Unix Command to Display Directories as Tree


Here is the command you can use to Display  Unix Directories like Tree structure, exactly like you use Tree command in windows which will give a similar out put like

N20:/data1/maxim/user01/mytest $ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
   .
   |-test1
   |-test2
   |-test3
   |-index
 
 
 

0 comments:

Post a Comment

 

ORA-BLOG. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com