I accidentally created 8 million files and every time I'm trying to delete them the server almost dies because of the rm process eating all disk IO (the server is remote without console).
Should something like this work i.e. invoking ionice?
sudo find /var/lib/php5/ -type f -exec ionice -c3 rm -f {} \;
-c3parameter? – badp Nov 1 '10 at 11:18ionice -c3basically set it to the lowest IO priority. – xenoterracide♦ Nov 1 '10 at 11:57unlinkis a system call which has essentially no IO activity. The file system implements the actual IO needed to complete an unlink so I don't know if ionice can help here. – msw Nov 1 '10 at 14:15