Linux: shell命令技巧

来自Shiyin's note
跳到导航 跳到搜索

将a1.ps 上两页合并为一页输出到文件a1_small.ps上(A4)格式。

psnup -pA4 -2 a1.ps a1_small.ps

wget下载一个目录

wget -t0 -c -nH -np -b -m -P /localdir http://destinationdirectory -o wget.log

Ascii文件转化为ps文件

a2ps -X ascii textfile -o textfile.ps

列出/etc/ld.so.conf里指定的目录下的所有库文件

ldconfig -v

firefox中的菜单字体配置

在~/.mozilla/firefox/*.default/chrome目录下将userChrome-example.css改名为userChrome.css,然后增加相关配置比如

结束命令1后,如果正确,则执行命令2

comand1 && comand2

mount iso文件

mount -o loop filename.iso /path/

删除包括空文件夹里面有空文件夹的情况

rmdir `find test/ -type d | sort -r`

删除目录下所有文件名含test的文件 find / -name “test*” |xargs rm -rf