The tree command is the protagonist of printing files and directories in a graphical structure. This command is not normally included in Linux distributions. You need to install it yourself with the package Manager.
Instance:
1. Tree
Print all files in current directory
2. Tree–p ${dir}
Print all files in the Dir directory and their permissions
3. Tree–h ${dir}
Print all files in dir directory, and the size of the appropriate read
4. Tree Path–p "*.sh"
Print all. Sh End of File
5. Tree Path–h http://localhost–o out.html
HTML file that contains the output of the directory tree
Interpreting--help
Usage:tree [-adfghilnpqrstuvxacdfns] [-H basehref] [-t title] [-L level [-R]]
[-P pattern] [I. Pattern] [-o filename] [--version] [--help] [--inodes]
[--device] [--noreport] [--nolinks] [--dirsfirst] [--charset CharSet]
[--filelimit #] [<directory List>]
-a list of all files
-D is only a directory
-L Symbolic link like directory
-F Prints the full path prefix for each file.
-I do not print indentation line
-Q Print non-printable characters?
-N Prints the nonprinting character is.
-p to print permissions for each file
-U displays file owner or UID
-G Displays the owner or GID of the file
-S to print the size of each file
-H prints more suitable file sizes for human readable ways.
-D Print Last modified date
-F Append '/', ' = ', ' * ' or ' | ' as per ls-f
-V Sort files by alphabetical number
-R arranging files in descending order by alphanumeric
-T sort files based on last time
-X stays in the current file system only
-L level trace levels of printing
-A printing figure indentation line
-S printing character indentation line
-N always turns off color (-C overrides).
-C Open Color
-P pattern lists only those that match the regular expression.
The-I pattern does not list the matches of the regular expression.
-H basehref prints out HTML format with BaseHref as top directory print the HMTL of the basic href format as the top-level directory
-T string Replace the default HTML title and H1 header with string. Replace this default HTML title and H1 title with a string
-R Rerun tree time Max dir level reached. Repeat trees when reaching the deepest directory levels
-o file output to file instead of output stream
--inodes the number of nodes to print per file
--device print device ID number to which each file belongs. Print the ID numbers of the respective files
--noreport Turn off File/directory count in end of tree listing. Close file or directory statistics at the end of the tree list
--nolinks Turn off hyperlinks in HTML output. To turn off hyperlinks to HTML output
--dirsfirst list directories before files. Print a directory before listing files
--charset x use CharSet X for HTML and indentation line output. Specify character set X as output for HTML and indentation lines
--filelimit # Don't descend dirs with more than # files in them. Directory Trace no more than # (directory name)
Interpretation:
1.–v–r
Arrange files according to letters, positive or descending numbers
2.-L level or--filelimit #
Are all traced to the level of the catalog
3.-X
Tree-x ${dir} Print only directory information at the current level
The main operations related to the file (not the file content) end with a small summary at the weekend and try to write some basic Linux commands.