sudo: unable to execute /bin/rm: Argument list too long
Linux,删除文件夹下所有内容,数据太多时,报错too long
sudo rm -r /var/lib/jenkins/workspace/test_1/allure-report/data/attachments/*
sudo: unable to execute /bin/rm: Argument list too long
解决办法:
sudo find /var/lib/jenkins/workspace/test_1/allure-report/data/attachments/ -type f -exec rm {} \;
sudo find /var/lib/jenkins/workspace/test_1/allure-report/data/test-cases/ -type f -exec rm {} \;
sudo find /var/lib/jenkins/workspace/test_1/test_report -type f -exec rm {} \;