sudo find /srv/lemmy/example.com/volumes/pictrs/files -type f -ctime -1 -exec rm {} \;
- sudo: run as root
- find /srv/lemmy/example.com/volumes/pictrs/files -type f: find files (f) in directory
- -ctime -1: which have been created in the last day
- -exec rm {} ; execute the command rm (remove) on each of them
RegalPotoo@lemmy.world 1 year ago
Looks fairly sane, finds every file in the given directory that was created in the last 24 hours and deletes them. Personally if you are dealing with CSAM I’d be using
shred
instead of justrm