You're making it far too complex to yourself. Just execute 'rm …

Friday, 29th March 2024

Comment on How to delete million of files on busy Linux servers (Work out Argument list too long) by Marco.

You're making it far too complex to yourself.
Just execute 'rm -f [yourneeds] &' and set process priority to a lower digi, using ''renice'.

Find the 'nice'for your process id (pid) with 'ps' :

ps -o pid,comm,nice -p 594 # replace 594 with your process id / pid

Then set the new priority for the process ID:

renice 10 -p 595 # replace 594 with your process id / pid

It is even possible to start the process as a 'nice'process:

nice -n 10 rm -f [yourneeds]

and renice it afterwards using 'renice'.

 

Marco Also Commented

How to delete million of files on busy Linux servers (Work out Argument list too long)
By the way, some Linux flavours also hold the 'nice' and 'renice' command. Check your MAN-pages if your version has them.


How to delete million of files on busy Linux servers (Work out Argument list too long)
You're making it far too complex to yourself.
Just execute 'rm -f [yourneeds] &' and set process priority to a lower digi, using 'nice'.

Find the process id (pid) with 'ps' and give it a new priority:

ps -o pid,comm,nice -p 594 # replace 594 with your process id / pid

 


Share this on:

Comments are closed.