Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7323

Beginners • how to delete files and folders older than 30 days

$
0
0
hi
I have this code which deletes the files, but leaves the empty folders. How can I get it to remove both files and empty folders?

Code:

#!bin/bashfind /home/pi/mnt2/4TBHDD/DoorBell -mindepth 1 -mtime +14 -delete
Thanks

Statistics: Posted by double-udee — Wed Jul 30, 2025 11:56 am — Replies 2 — Views 53



Viewing all articles
Browse latest Browse all 7323

Trending Articles