1.命令行展开{}
mkdir -p a/b/{c,d/e}
2.-v verbose 详细的
3.touch
touch - change file timestamps
4.stat 文件 显示文件的详细信息(三个时间戳)
[[email protected] eric opt]# stat jdk-8u131-linux-x64.tar.gz File: `jdk-8u131-linux-x64.tar.gz‘ Size: 185540433 Blocks: 362384 IO Block: 4096 regular file Device: 802h/2050d Inode: 261639 Links: 1 Access: (0744/-rwxr--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2017-05-11 06:48:25.341471779 -0700 Modify: 2017-05-11 06:48:34.635471851 -0700 Change: 2017-05-11 06:48:34.635471851 -0700 [[email protected] eric opt]#
5.cp
-r 递归复制一个目录
[[email protected] eric tmp]# cp -rv /opt/ /tmp/ `/opt/‘ -> `/tmp/opt‘ `/opt/jdk-8u131-linux-x64.tar.gz‘ -> `/tmp/opt/jdk-8u131-linux-x64.tar.gz‘ `/opt/rh‘ -> `/tmp/opt/rh‘ `/opt/yes‘ -> `/tmp/opt/yes‘
-p 保留属主(preserve)
-a archive 归档复制,常用于备份
-a, --archive same as -dR --preserve=all -d same as --no-dereference --preserve=links -P, --no-dereference never follow symbolic links in SOURCE -R, -r, --recursive copy directories recursively
6.install
-d DIRECTORY...创建目录
SRC DES 复制
-t DIRECTORY SRC
只能复制文件,不可以是目录
时间: 2024-11-10 16:53:30