bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

linux中history命令的介紹和使用

1、manual說明
Display or manipulate the history list
顯示或操作命令歷史列表
2、概念區分
history  list是在內存緩存中的,history  file就是在硬盤中的。history  list針對當前會話生效。history   file 則針對所有會話都生效。當登錄系統系統時,系統就會自動將history  list中,當退出系統時,history  list中的命令就會自動寫入到history  file中去。
~/.bash_history      歷史列表的默認保存位置
~/.bash_profile       當前用戶的環境變量的設置位置
/etc/profile              系統環境變量的默認設置位置
關于HISTORY的變量:
HISTSIZE   命令歷史記錄的條數
HISTFILE    指定歷史文件,默認為~/.bash_history
HISTFILESIZE:  命令歷史文件記錄歷史的條數
HISTTIMEFORMAT:  HISTTIMEFORMAT=“%F%T”   顯示時間
history用法:
history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
Display the history list with line numbers, prefixing each modified      entry with a `'.  An argument of N lists only the last N entries
顯示帶有行號的歷史記錄列表,并在每個修改前加上前綴
帶有“
”的條目。N的參數只列出最后的N個元素。
Options:
-c:    clear the history list by deleting all of the entries
通過刪除所有條目來清除歷史記錄列表
linux中history命令的介紹和使用
-d offset:     delete the history entry at offset OFFSET
在偏移位置刪除歷史記錄項(就是刪除指定數字的歷史條目)
linux中history命令的介紹和使用
-a:   append   history lines  from  this  session  to  the  history  file
將此會話的歷史記錄行追家到歷史記錄文件
linux中history命令的介紹和使用
-n:   read all  history  lines  not  already read  from the history  file 。
讀取尚未從歷史文件中讀取的所有歷史記錄行
linux中history命令的介紹和使用
-r:    read  the  history  file and  append  the  contents  to   the  history  list
讀取歷史文件然后追加到歷史記錄文件中
linux中history命令的介紹和使用
-w:   write   the current history to  the  history file   and  append  them  to the history  list
將當前歷史寫入到歷史文件中,同時將他們追加到歷史列表中。
linux中history命令的介紹和使用
-p:  perform history  expansion   on  each  AGR  and  dispay   the  result  without storing  it in   the   history  list
對每個參數執行歷史擴展并顯示結果,而不將其存儲在歷史列表中
linux中history命令的介紹和使用
-s: append  the  ARGs  to   the  history   list  as  a  single  entry  
添加所有ARGs作為單獨的條目到歷史記錄條目中。
linux中history命令的介紹和使用

創新互聯專注于坡頭網站建設服務及定制,我們擁有豐富的企業做網站經驗。 熱誠為您提供坡頭營銷型網站建設,坡頭網站制作、坡頭網頁設計、坡頭網站官網定制、小程序設計服務,打造坡頭網絡公司原創品牌,更為您提供坡頭網站排名全網營銷落地服務。

其他比較常用的用法:
(一):查看歷史命令
history    #顯示所有歷史命令’
history   10   #顯示最近的10條命令
(二)查看默認歷史命令條數:
echo   $HISTSIZE
這個環境變量定義在/etc/profile中
(三)命令重新調用
ls  !407  #重新調用歷史命令中的正數第407個命令
ls  !-4    #重新調用歷史中的倒數第4條命令
歷史命令分兩部分存放:    .bash_history  和內存中
正常退出時,內存中的歷史命令會存儲到.bash_history中
(四)執行前面倒數第一個以shut開頭的命令
!shut
(五)執行前面一個包含go的命令
!?go
(六)執行剛剛執行過的命令
1、上下鍵翻
2、!-1
(七)搜索執行過的命令              
linux中history命令的介紹和使用

分享文章:linux中history命令的介紹和使用
文章分享:http://vcdvsql.cn/article0/gjegoo.html

成都網站建設公司_創新互聯,為您提供自適應網站做網站搜索引擎優化、手機網站建設、網站設計、網站設計公司

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

營銷型網站建設