Comment on Need help understanding a back-up script
klay@lemmy.world 1 year 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 1 year ago
You’re right, I edited my comment. Thanks!
mnmalst@lemmy.zip 1 year ago
Your xargs comment is still wrong tho. It deletes ALL but the most recent two files.
doeknius_gloek@feddit.de 1 year ago
Fixed, thanks.