log

编译时,将标准输出和标准出错,同时输出到终端和文件中

1
make 2>&1 | tee log.txt

Find

查找某个文件,并copy到特定路径

-i 表示 find 传递给xargs的结果 由{}来代替。

1
find . -name "*.png" | xargs -i cp {}  out_dir/.

Cut

以特定字符截

1
2
3
steven@chenlong:~$ echo "1;2;3"  | cut -d ';'  -f 1
1