命令如下:
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
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。