git clone https://github.com/ruowenXin/start-project.git? 將文件導(dǎo)入
日常文件操作
復(fù)制文件目錄
$ cp -r dir1 dir2
$ cp file1 file2
移動文件目錄
$ mv dir1 Desktop/dir1
重命名文件目錄
$ mv file1 file2
$ mv dir1 dir2
刪除文件目錄
$ rm file
$ rm -r dir
創(chuàng)建文件目錄
$ mkdir dir
$ touch file
$ >file
$ vim file
查看文件內(nèi)容
$ cat file # 適合比較短的文件
$ less file # 有快捷鍵,可以看比較長的文件
查看文件類型 fiie
$ file file1
$ file dir1
查看文件大小
$ du -k file
$ du -m file
重定向
移動新的目錄的命令:$ mv a.txt Desk/myd
再不打開這個文件的情況下:輸入這個文件中,echo "this is">a.txt
將兩個文件的內(nèi)容連接在一起:$ cat file1 file2 >file
查看里面有沒有is這個詞:grep is < c.txt
權(quán)限
查看當(dāng)前的權(quán)限:$ ls -l a.txt
修改這個文件的權(quán)限:chmod 777 a.txt
進(jìn)程
出現(xiàn)端口那些顯示的:
ps aux|less
ps aux| grep a.txt