This snipit of code is used to change the priority of Minecraft so that I can squeeze out a bit more performance.
A break down of the command:
- renice -n -20
used to set the max priority of a process. The renice command needs a process id to operate on
- ps -aux | grep minecraft | awk '{print $2}' | tail -2 | head -1
the ps command gets a list of processes. It returns many things such as who is running the process and the process id the grep command takes the output piped from ps and searched for any output that contains 'minecraft' we use the awk command to select specific columns. In this case we use it select the 2nd column which contains the process id tail and head are used to narrow down the results to one id