find . -type f -print0 | xargs -0 ls -ltr | head -n 10 | awk '{print
$NF}' | xargs rm
This command is giving me this:
xargs: 'ls' terminated by signal 13
However, it's executing fine. It's supposed to delete the 10 oldest files on the specific folder. Is there something to worry about? Is there a fix?
Server is running BuildRoot.
ls
and you wouldn't get a total sort - can be found at https://unix.stackexchange.com/questions/22674/shell-script-for-moving-oldest-files – Mark Plotnick Sep 10 '18 at 19:35