Saturday, 17 September 2011

Tree - A better way than plain 'ls'

As we all know about 'ls' it will list the directory or files in the folder we are located. We can use ls -l to list in a list format, etc - but there is a better colorful way to list your files and folder, its called "tree". It is an external tool and needs to be installed (if you are using Ubuntu it will spell out what to type to install the tool).

To use the command, just type "tree" or "tree Directory/" to list all the files in tree format. Here is a demo :

user1:~$ tree Desktop/
Desktop/
├── 66.txt
├── CM-Phone-to-PSTN.odg
├── nature7.jpg
├── table_export.xls
└── www.zip

0 directories, 5 files

Ofcourse, in color :).

No comments:

Post a Comment