1:touch file ##建立一個檔案
2:mkdir test ##建立一個目錄
mkdir -p test1/test2 ##-p建立遞回目錄
3. rm file ##檔案洗掉
rm -f file
4. rm -r directory ##-r表示遞回洗掉,
rm -r -f dir
5. gedit file ##必須有圖形
vim file ##撰寫檔案,:wq退出保存
6:cat file ##查看檔案中的內容
7:tail file ##查看檔案后十行內容
8:head file ##查看檔案前十行內容
9:less file ##翻頁瀏覽
10:mv file file2 ##file檔案的內容被覆寫掉, 相當于重命名
11:mv file dir ##將file檔案移動到dir目錄 中
mv dir/ . ##把dir中的所以檔案移動到桌面
12:cp file file1 ##將file檔案內容復制到file1檔案中
13:cp file file1 dir ##將file,file1檔案復制到dir目錄中
14: cp -r dir dir1 ##將dir源文目錄復制到dir1目的目錄中
15:wc file ##統計檔案大小
-l file ##統計檔案行數
-c file ##統計檔案位元組數
-w file ##統計檔案單詞數
-m file ##統計檔案字符數
[root@localhost Desktop]# touch WESTOS_class{1,2}_linux{1..6} redhat_version{1..8}
[root@localhost Desktop]# mkdir study /tmp/VERSION SINGLE /DOUBLE CLASS1 CLASS2 confdir
[root@localhost Desktop]# mv WESTOS_class{1,2}_linux{1..6} study
[root@localhost Desktop]# mv redhat_version{1..8} /tmp/VERSION
[root@localhost Desktop]# cp /tmp/VERSIONredhat_version{1,3,5,7} SINGLE
[root@localhost Desktop]# cp /tmp/VERSIONredhat_version{2,4,6,8} /DOUBLE
[root@localhost Desktop]# mv study/WESTOS_class[1]_linux{1..6} CLASS1
[root@localhost Desktop]# mv study/WESTOS_class[2]_linux{1..6} CLASS2
[root@localhost Desktop]# cp /etc/*[[:alpha:][:digit:]]*.conf confdir
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/117541.html
標籤:非技術區
下一篇:第一次作業
