-empty选项可以检测文件夹为空,或者文件内容为空。
-delete可以执行删除。
$ find old/ -empty -delete
如果只想删除空文件夹,可以加上一个类型:
$ find old/ -type d -empty -delete