文件与目录管理

文件与目录管理

😄 Written by Zak Zhu

参考

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命令

  1. e.g. stat home/

    1

  2. 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...
posted @ 2019-10-07 23:40  ZakZhu  阅读(129)  评论(0)    收藏  举报