useradd fileremove
find ./ -mtime +30 -type f > /tmp/file.txt
tar cvfz /tmp/$filename.tgz -T /tmp/file.txt
cat /tmp/file.txt |xargs -n 10 chown fileremove.fileremove
sudo -u fileremove cat /tmp/file.txt |xargs -n 10 rm
时间: 2024-11-05 04:53:23
useradd fileremove
find ./ -mtime +30 -type f > /tmp/file.txt
tar cvfz /tmp/$filename.tgz -T /tmp/file.txt
cat /tmp/file.txt |xargs -n 10 chown fileremove.fileremove
sudo -u fileremove cat /tmp/file.txt |xargs -n 10 rm