文件与目录管理
文件与目录管理
😄 Written by Zak Zhu
参考
- 鸟哥私房菜
- 张小飞_/命令行使用之tree命令(https://www.jianshu.com/p/f117be185c6f)
- 感谢 Alex Ti
cd命令
. # 当前目录
.. # 上一层目录
- # 前一个工作目录
~ # 当前用户的家目录
~zac # zac用户的家目录
pwd命令
Print the name of the current Working Directory.
ls命令
Usage:
ls [OPTION]... [FILE]...
Options:
-a, --all
-d, --directory
-h, --human-readable
-l
stat命令
-
e.g.
stat home/![1]()
-
e.g.
stat -t home/![2]()
tree命令
yum install tree -y
Usage:
tree [OPTION]... DIRECTORY
Options:
-C # turn colorization on always
-L level # Descend only level directories deep
-d # List directory only
cp命令
Usage:
cp [OPTION]... SOURCE DEST
Options:
-a, --archive # same as -dR, --preserve=all
-r, --recursive # copy directories recursively
-u, --update # copy only when the SOURCE file is newer than the destination file
-v, --verbose
rm命令
rm [FILE]... -rf
mv命令
Usage:
mv [OPTION]... SOURCE DEST
Options:
-u, --update # move only when the SOURCE file is newer than the destination file
-v, --verbose
touch命令
创建新文件或修改文件时间
mkdir命令
mkdir [-p, --parents] [-v, --verbose] DIRECRORY...



浙公网安备 33010602011771号