指令

常用打包工具(tar, gzip, bzip, zip, 7z, xz, pigz)

更新時間: 2019-07-08

 

目錄

pv [ console 下的 progress bar ]

最後更新: 2016-08-04

介紹

 

用慣了 M$ 的框框, 每次 copy 檔案時都有 progress bar 出現,

好讓人知幾時可以完工, 那難道 Linux Console 下沒有嗎 ?

有! 它就是 pv 了, 全名 Pipe Viewer

 

bash shell tips

介紹:

 

用 Linux 的人大多數時間都是和 shell 打交道,

日復日, 年復年, 漸漸可能有點累 .......

如果你有這感覺, 那相信你仍未獲得用 shell 的奧義 ~

以下只是拋磚引玉, 還有很多技巧留待大家發掘 ^ ^

 

目錄:

  1. insert-completions ( Alt + * )
  2. 返回值 ( $? )
  3. 上一指今的參數 ( !* )
  4. bash_completion ( 指令的參數 )
  5. history 怎麼會沒有時間 ??
  6. bash 的設定 ( set -o )

 

 


 

insert-completions

 

假設現在有一個目錄, 內有 file_1, file_2, file_3 ........... file_10

script ( terminal 記錄工具 )

script

它是可出將 terminal 輸出的文字寫入到檔案內

# script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script

-a            Append the output to file
-t             Output timeing data to standard error

Output timeing data:

<time elapsed since the previous output> <characters were output this time>

 

重播 upgrade-lenny.script 的過程
# scriptreplay ~/upgrade-lenny.time ~/upgrade-lenny.script

 

Remark:

script 及 scriptreplay 是在 bsdutils 包內的

RSS feed