linux的一些常用小命令

2021-09-12 12:19:58 字數 620 閱讀 5793

1 vim顯示行號

set number

2 vim搜尋字串

/***x ***x為要搜尋內容 如果很多怎麼辦 輸入n

3 cat的簡單使用

4  ls各個列的簡單事例(其中檔案數大於1一般是只目錄內的情況)

位置1 2 3 4 5 6 7  

檔案屬性 檔案數 擁有者 所屬的group 檔案大小 建檔日期 檔名  

drwx------ 2 guest users 1024 nov 21 21:05 mail  

-rwx--x--x 1 root root 89080 nov 7 22:41 tar*  

-rwxr-xr-x 1 root bin 5013 aug 15 9:32 uname*  

lrwxrwxrwx 1 root root 4 nov 24 19:30 zcat->gzip  

-rwxr-xr-x 1 root bin 308364 nov 29 7:43 zsh*  

-rwsr-x--- 1 root bin 9853 aug 15 5:46 su* 

git 一些常用的小命令

1 新建資料夾 mkdir floder 2 獲取檔案的當前路徑 pwd 3 將新建的檔案變成git可以管理的倉庫 git init 4 將新的檔案存放至暫存區 git add file 5 提交至git倉庫 git commit m git commit m this is desc 6 檢視結果...

一些shell的小命令

這裡採用bash進行shell程式設計。因為bash是免費的,並且方便使用。bash bourne again shell 檔案命名為 myshell.sh 執行檔案前,先獲得許可權 chomod 777 myshell.sh 1.顯示檔案內容 bin bash cat myshell.sh 執行命...

linux常用的小命令

檢視linux版本 uname a圖上可知,linux核心版本為2.6.32 檢視cpu核數 cat proc cpuinfo grep cores uniq 系統中查詢檔案 root ubuntu find name nginx 使用locate可以檢視相關檔名 日誌處理 日誌處理 高效linux...