Click here to Skip to main content
14,973,001 members
Articles / Programming Languages / Perl
Posted 30 Dec 2006


12 bookmarked

Tree view in linux

Rate me:
Please Sign up or sign in to vote.
2.50/5 (12 votes)
22 Apr 2008CPOL
This script displays tree view of the directory on linux terminal.

Sample Image - tree_view.jpg


This script has been made to display tree view of directory in linux (like tree command in DOS). It scans directory recursively and then displays the tree view. Using "-width" argument tree view can be compressed or expanded. To display how to give arguments to script type "perl" on the linux terminal. Follow the instructions displayed in the help. One need to have perl package installed in the system for this script to work. Default $expand_size = 5 and $max_width = 10. expand_size decides how much is space in between + and "name of directory or file". max_width is the maximum value of expand_size. User can increase default expand_size and max_width by editing

Visit my blog site at for some more interesting and useful stuff like

Java Utility for Mobile phone at

Utility to lock-unlock your hard disk at

This perl script is also available at


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

Comments and Discussions

GeneralMore tree options Pin
sna gar25-Nov-07 5:01
Membersna gar25-Nov-07 5:01 
QuestionLinux forum? Pin
Msftone2-Jan-07 1:04
MemberMsftone2-Jan-07 1:04 
AnswerRe: Linux forum? Pin
Sandeep_Vaniya2-Jan-07 2:03
MemberSandeep_Vaniya2-Jan-07 2:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.