Write an lstree

Source: Internet
Author: User
ArticleDirectory
  • 1. Origin
  • 2. Source Code
1. Origin

Some of us get a file, which we usually don't know clearly. For example, if you get a friend and send it to youSource codeIf you can see the source at a glanceCodeHow nice the directory structure should be.

My previous practices are:

$ LS-R

However, we cannot see the level of the directory structure. Can we write a pstree-like tool to complete this task?

Certainly. For example, we want to see the GNU coreutils source code directory structure:

~ /Repo/coreutils $ lstree | grep '/$'m4/Gl/M4/lib/modules/tests/po/doc/man/lib/src/old/textutils/sh- utils/fileutils/gnulib/tests/MV/RM/chown/DD/split/ID/tail-2/PR/chmod/DF/ln/readlink/rmdir/CP/ls/ misc/FMT/chgrp/mkdir/install/du/touch/build-Aux/scripts/Git-hooks/gnulib-tests/

In this way, you can clearly understand how GNU coreutils organizes directories.

2. Source Code

Jatsz/coreutils-ex

Git clone git: // github.com/jatsz/coreutils-ex.git

Have fun!

Related Article

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.