1.look
用來查英文單詞不錯- -
look succesful
2.pv
echo "Tecmint [dot] com is the world's best website for qualitative Linux article" | pv -qL 20
放電影一樣把字幕輸出
3.factor
factor 1024
"The factor command is actually a command of mathematical origin. This command outputs all the factors of a given number."
4.logsave
logsave -a out.log echo "hello world"
logsave is a very nice tool that captures the output of a program and sends it too a log-file. It’s more or less the same what “tee” does, only it will add a begin time stamp and a end time stamp:
5.strace
strace -p 1725 -o output.txt
strace -c ls /home
6.nc
發送一個文件很簡單,但是如果我們想要發送多個文件,或者整個目錄,一樣很簡單,只需要使用壓縮工具tar,壓縮后發送壓縮包。
如果你想要通過網絡傳輸一個目錄從A到B。
Server
$tar -cvf – dir_name | nc -l 1567
Client
$nc -n 172.31.100.7 1567 | tar -xvf -
這里在A服務器上,我們創建一個tar歸檔包并且通過-在控制臺重定向它,然后使用管道,重定向給netcat,netcat可以通過網絡發送它。
在客戶端我們下載該壓縮包通過netcat 管道然后打開文件。
如果想要節省帶寬傳輸壓縮包,我們可以使用bzip2或者其他工具壓縮。
Server
$tar -cvf – dir_name| bzip2 -z | nc -l 1567
通過bzip2壓縮
Client
$nc -n 172.31.100.7 1567 | bzip2 -d |tar -xvf -
使用bzip2解壓