action #165126
closed
error from cron "Cron <geekotest@ariel> find /var/lib/snapshot-changes/opensuse/Tumbleweed/ -maxdepth 1 -mindepth 1 -type f -printf '"
Added by okurz 6 months ago.
Updated 6 months ago.
Category:
Regressions/Crashes
- Status changed from New to In Progress
Instead of the seemingly clunky
find /var/lib/snapshot-changes/opensuse/Tumbleweed/ -maxdepth 1 -mindepth 1 -type f -printf '%T@\t%p\n' | sort -t $'\t' -g | head -n -60 | cut -d $'\t' -f 2- | xargs rm
now using
ls -t /var/lib/snapshot-changes/opensuse/Tumbleweed/* | tail -n +60 | xargs rm -f
the -f
on rm
prevents an error message about missing operand when there are no files to delete.
and removed entries not relevant anymore like 30 1 * * SUN geekotest ls -t /var/lib/snapshot-changes/opensuse/1*/* | tail -n +60 | xargs rm
- Status changed from In Progress to Resolved
Executed all manually and verified the result.
Also available in: Atom
PDF