I customized some joycons for my steam deck
I customized some joycons for my steam deck
joycons for steam
head -n -2 means “everything up to but not including the last two lines”, so this should always leave two files remaining.
Ah! This is a shell pipe! It’s composing several smaller commands together, cool stuff.
ls -1 is the grep-friendly version of ls, it prints one entry per line, like a shopping list.head takes a set number of entries from the head of a list, in this case 2 items.xargs takes the incoming pipe and converts it into extra arguments, in this case applying those arguments to rm.So, combined, this says “list all the .dump files, pick the first two, and delete them.” Presumably the first two are the oldest ones, if the .dump files are named chronologically.