删除隐藏文件
rm -rf .[!.]*
查找空文件夹
find -type d -empty
查找空文件,并在空文件下创建 .keep文件
find -type d -empty -exec touch {}/.keep \;
如果要忽略某个文件夹的搜索的话:
find -type d -empty ! -path "./.git/*"
删除隐藏文件
rm -rf .[!.]*
查找空文件夹
find -type d -empty
查找空文件,并在空文件下创建 .keep文件
find -type d -empty -exec touch {}/.keep \;
如果要忽略某个文件夹的搜索的话:
find -type d -empty ! -path "./.git/*"