新建目录:
mkdir directory
mkdir [-m] [-p] 目录
-m 指定属性,也可以事后用chmod命令修改属性
-p 指定目录,默认是在当前目录想创建新的目录
rm 删除文件或目录( 可以使用正则表达式 )
mv 移动文件或目录
如子目录下将父目录的兄弟目录移到当前目录:
mv ../instruction .
mv 还可以用来重命名文件或目录
mv gzip.txt tar.txt
cp 复制
cp - copy files and directories
SYNOPSIS
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...
DESCRIPTION
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options too.
-a, --archive
same as -dR --preserve=all
--backup[=CONTROL]
make a backup of each existing destination file
-b like --backup but does not accept an argument
--copy-contents
copy contents of special files when recursive
-d same as --no-dereference --preserve=links
-f, --force
if an existing destination file cannot be opened, remove it and try again (redundant if the -n option is used)
-i, --interactive
prompt before overwrite (overrides a previous -n option)
-l, --link
link files instead of copying
-L, --dereference
always follow symbolic links in SOURCE
-n, --no-clobber
do not overwrite an existing file (overrides a previous -i option)
-P, --no-dereference
never follow symbolic links in SOURCE
常用:
-a :相当于-pdr的意思
-i :提示
-f :强制复制(替换)
-r :递归复制,适用于目录