命令如下:
find . -maxdepth 1 -mindepth 1 -type d -exec tar cvf {}.tar {} ;
测试后,运行结果如下:
参考资料
=============
https://stackoverflow.com/questions/15936003/for-each-dir-create-a-tar-file
命令如下:
find . -maxdepth 1 -mindepth 1 -type d -exec tar cvf {}.tar {} ;
测试后,运行结果如下:
参考资料
=============
https://stackoverflow.com/questions/15936003/for-each-dir-create-a-tar-file