LINUX [003] file and directory management

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/shipsail/article/details/89397616

Comparing Linux and Windows file system directory

Win in: \ backslash
Linux: / slash

Win Linux
Directory separator \ Backslash / Forward slash
Directory Structure CDE sub-plate It all starts with the root of the "home"

pwd current directory

print working directory Display the current working directory absolute path

pwd [parameters]

parameter Explanation
L logical logical address, ignoring the soft link file
P physical physical address, the real path

PWD $ echo
pwd -L
these two commands are the same

PS1 variable

Temporarily empty

cd Change directory

cd [parameters] [directory]

parameter Explanation
-L logical logical address
-P real physical address
- Return to a directory on the user's access
~ HOME directory
. . Return to the previous directory
. ./. ./ And so on back to the top

tree tree

tree [parameters] [directory]

parameter Explanation
-a all output of all
-d directory output directory
-f file output file
-i Often do not show branches with the -f
-L level Layer traverse the maximum number of layers level> 0
-F * Join executable file, directory /, Socket =, @ symbolic links, pipelines and other symbols name

application

  1. Check the tree command rpm -qa tree
  2. 安装tree yum -y install tree
  3. Use tree

Guess you like

Origin blog.csdn.net/shipsail/article/details/89397616