中文字幕亚洲第一精品|精品国产免费一区二区|久久婷婷五月六月综合版|中文字幕熟妇久久久人妻|久久综合精品国产一区无码|国产成人精品永久免费视频|午夜亚洲国产精品理论片a级|久久精品一区二区三区无码护土

 訪問手機(jī)版  

Linux常用命令|Linux培訓(xùn)學(xué)習(xí)|考試認(rèn)證|工資待遇與招聘,認(rèn)準(zhǔn)超級(jí)網(wǎng)工!

招聘|合作 登陸|注冊(cè)

網(wǎng)絡(luò)工程師培訓(xùn)

當(dāng)前位置:網(wǎng)絡(luò)工程師 > 技術(shù)課程 > linux > 熱點(diǎn)關(guān)注 > linux常用命令

linux命令(mv,cp,touch)

時(shí)間:2019-09-07

linux格式化命令_linux命令_linux命令

[ligang@centos6 test]$ ll
total 4
-rw-r--r-- 1 ligang trainning    0 Mar 10 00:35 haha.txt
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:19 test1
[ligang@centos6 test]$ cp haha.txt test1/
[ligang@centos6 test]$ ll test1/
total 4
-rw-r--r-- 1 ligang trainning 0 Mar 10 00:36 haha.txt
-rw-r--r-- 1 ligang trainning 7 Mar 10 00:07 log1.txt
-rw-r--r-- 1 ligang trainning 0 Mar 10 00:10 log2.txt
[ligang@centos6 test]$ cp haha.txt test1/
[ligang@centos6 test]$ ll test1/
total 4
-rw-r--r-- 1 ligang trainning 0 Mar 10 00:36 haha.txt
-rw-r--r-- 1 ligang trainning 7 Mar 10 00:07 log1.txt
-rw-r--r-- 1 ligang trainning 0 Mar 10 00:10 log2.txt

linux命令_linux格式化命令_linux命令

(2)cp不能直接把文件夾復(fù)制給另外一個(gè)文件夾,否者要加參數(shù)-rf。如果要把一個(gè)文件夾下內(nèi)容復(fù)制給另外一個(gè)文件夾則用dir/*

linux命令_linux格式化命令_linux命令

[ligang@centos6 test]$ cp test2/ test1
cp: omitting directory `test2/'
[ligang@centos6 test]$ cp -rf test2/ test1
[ligang@centos6 test]$ ll
total 12
-rw-r--r-- 1 ligang trainning    5 Mar 10 00:37 haha.txt
drwxr-xr-x 3 ligang trainning 4096 Mar 10 00:42 test1
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:40 test2
[ligang@centos6 test]$ mkdir test3
[ligang@centos6 test]$ cp -af test3 test1
[ligang@centos6 test]$ ll test1
total 16
-rw-r--r-- 1 ligang trainning    5 Mar 10 00:37 haha.txt
-rw-r--r-- 1 ligang trainning    7 Mar 10 00:07 log1.txt
-rw-r--r-- 1 ligang trainning    0 Mar 10 00:10 log2.txt
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test2
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test3
[ligang@centos6 test]$ mkdir test4
[ligang@centos6 test]$ c test4
-bash: c: command not found
[ligang@centos6 test]$ cd test4
[ligang@centos6 test4]$ touch test.txt
[ligang@centos6 test4]$ cd ..
[ligang@centos6 test]$ cp -rf test4/ test1
[ligang@centos6 test]$ ll test1
total 20
-rw-r--r-- 1 ligang trainning    5 Mar 10 00:37 haha.txt
-rw-r--r-- 1 ligang trainning    7 Mar 10 00:07 log1.txt
-rw-r--r-- 1 ligang trainning    0 Mar 10 00:10 log2.txt
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test2
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test3
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:45 test4
[ligang@centos6 test]$ cp  test4/* test1
[ligang@centos6 test]$ ll test1
total 20
-rw-r--r-- 1 ligang trainning    5 Mar 10 00:37 haha.txt
-rw-r--r-- 1 ligang trainning    7 Mar 10 00:07 log1.txt
-rw-r--r-- 1 ligang trainning    0 Mar 10 00:10 log2.txt
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test2
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:42 test3
drwxr-xr-x 2 ligang trainning 4096 Mar 10 00:45 test4
-rw-r--r-- 1 ligang trainning    0 Mar 10 00:45 test.txt

linux命令_linux格式化命令_linux命令

9linux命令,touch

linux命令_linux格式化命令_linux命令

功能:用來修改文件時(shí)間戳linux命令,或者新建一個(gè)不存在的文件。

-r把指定文檔或目錄的日期時(shí)間,統(tǒng)統(tǒng)設(shè)成和參考文檔或目錄的日期時(shí)間相同。

-t使用指定的日期時(shí)間,而非現(xiàn)在的時(shí)間。格式: [[CC]YY]MMDDhhmm[.SS]