1. 程式人生 > >linux筆記_day03

linux筆記_day03

reg install size ice rec ash 詳細信息 amp 復制文件

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

  只能復制文件,不可以是目錄

  

linux筆記_day03