this post was submitted on 15 Apr 2025
5 points (100.0% liked)

Linux

2037 readers
1 users here now

Everything about Linux

RULES

founded 2 years ago
MODERATORS
 

If I copy files with backup (cp --backup=numbered), the old file is renamed to something like oldfile.ext.~1~. I get my old files. Can this be limited to a certain number of old files, for example 30? I don't want to have keep more than that...

you are viewing a single comment's thread
view the rest of the comments
[–] INeedMana@lemmy.world 1 points 4 months ago

With cp, I don't think so. But I guess you could try using logrotate for that