Skip to content

Tag: linux

How to force a priority on QProcess

I do not see any API to set the priority of a QProcess in Qt Documentation. I assume the process is started with normal priority. Is there a way to start the process with lower priority on Linux? Answer I dont think there exists an API to set the priority of the process using a Qt call. I used direct

how to replace a block of text after a match in sed

In sed, I’d like to replace a multi-line block of text after a match, for example, after matching “foo”, supposing its line number is 0. I want to replace the text block from line -3 to line +5, i.e. the text bock between the third line proceeding the matching line and the fifth line after t…

wget -O for non-existing save path?

I can’t wget while there is no path already to save. I mean, wget doens’t work for the non-existing save paths. For e.g: If /path/to/image/ is not previously existed, it always returns: How can i make it work to automatically create the path and save? Answer Try curl

handling vps numproc limits

this is my vps package £14.99 uk pounds a month, so not to expensive. Thay are limiting numproc to 96, they didn’t make it obvious that this was a limit when I signed up, but I suppose it is my fault for not asking. I am running Tomcat and if I run out of numproc then Java will crash and