Evaluating recordsdata
diff: evaluate recordsdata line by line
cmp: evaluate recordsdata byte by byte
comm: evaluate sorted recordsdata line by line
Linux supplies a number of instructions for evaluating textual content recordsdata. For those who run a command equivalent to diff file1 file2 you’ll see the strains which can be solely within the first file preceded by < indicators and people which can be solely within the second preceded by > indicators. For those who use the cmp command, you’ll simply see the place the variations within the recordsdata begin (e.g, byte 25, line 4). No output means the recordsdata are equivalent. The comm command shows its output in an indented format – the leftmost column containing the widespread strains, the subsequent displaying the strains within the first file solely, and the final exhibiting the strains within the second file solely. The recordsdata’ contents ought to be in sorted order.
Viewing operating processes
ps: show operating processes
You may view processes on the system utilizing the ps command. With out arguments, the output will solely show the processes you might be operating. Use ps -ef or ps -aux to view the entire processes operating on the system (i.e., as many as will match into your terminal window).
high: show checklist of operating processes in exercise order
The high command gives you an thought how busy the system is general. It would show issues equivalent to load averages, reminiscence utilization, the variety of processes operating and CPU utilization within the first strains. This will probably be adopted by a listing of operating processes exhibiting these utilizing probably the most system assets first 5 strains after which fill your terminal window with as many different processes as slot in your terminal window – all in system utilization order. The show will replace itself each few seconds or so.
Wrap-up
To be taught extra about Linux instructions, you may need to get your fingers on a Linux command cheat sheet. And in case you’re utilizing the bash shell, a bash cheat sheet will help you begin writing scripts that let you automate routine duties. Listed here are some choices: