Linux/删除

来自康健生活

引言

删除文件

一次性删除某目录及其子目录下所有以.pdf为后缀的文件。

 
find . -name '*.pdf' -type f -print -exec rm -rf {} \;

删除空文件夹

 
find -type d -empty