Comment on Need help understanding a back-up script
klay@lemmy.world 8 months agoI just looked up the man page, and actually head -n -2
means “everything up to but not including the last two lines”, so this should always leave two files remaining.
doeknius_gloek@feddit.de 8 months ago
You’re right, I edited my comment. Thanks!
mnmalst@lemmy.zip 8 months ago
Your xargs comment is still wrong tho. It deletes ALL but the most recent two files.
doeknius_gloek@feddit.de 8 months ago
Fixed, thanks.