The tree command for Linux

Source: Internet
Author: User

Discover Linux has a good command, tree, can put the directory in the form of trees, but also support very powerful parameters.

But by default is not with, you have to go to install, first to download its code: http://mama.indstate.edu/users/ice/tree/

I downloaded is 1.7.0, is a tgz package, unzip it.

Then modify its compilation configuration file, if you use Linux, you do not have to change, if you and I use the same Mac OS X, open makefile, according to the comments in the makefile, the Linux section commented out, and then cancel the Mac OS x part of the comments, such as:

...... # Linux defaults:33 #CFLAGS =-ggdb-wall-dlinux-d_largefile64_source-d_file_offset_bits=64 #CFLAGS =-o4-wall  -dlinux-d_largefile64_source-d_file_offset_bits=64 #LDFLAGS =-s ... # Uncomment for OS x:56 #CC =cc cflags=-o2-wall-fomit-frame-pointer-no-cpp-precomp #LDFLAGS = #MANDIR =/usr/s Hare/man/man1 OBJS+=STRVERSCMP.O ...

Save Exit, execute:

$make

No problem, then proceed:

$sudo make Install

Try it now, I like to use it:

$tree-SHC

This is the execution effect:

As a reminder, it can be time-consuming to execute this command in a directory with a lot of content.

From:http://www.cnblogs.com/guogangj/p/3957458.html

The tree command for Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.