doeknius_gloek, 8 months ago (edited 8 months ago) This line seems to list all dumps and then deletes all but the two most recent ones. In detail: ls -1 /backup/*.dump lists all files ending with .dump alphabetically inside the /backup directory head -n -2 returns all filenames except the two most recent ones from the end of the list xargs rm -f passes the filenames to rm -f to delete them Take a look at explainshell.com.
This line seems to list all dumps and then deletes all but the two most recent ones.
In detail:
ls -1 /backup/*.dump
head -n -2
xargs rm -f
rm -f
Take a look at explainshell.com.