Apr 9

I’m sorry that I haven’t written for such a long time. It’s going to change:)

We have a program, which can suspend our terminal. We want to be sure, that program won’t be executed for more than n seconds. Here is a solution:

((sleep 10 && killall top)&); top

Explanation:
sleep 10 is executed for 10 seconds and then exit (you can use sleep n if you want sleep to be executed for n seconds

killall top terminates all processes named “top”

top - is example of program; top shows information about processes in your system

command1 && command2 – executes command1 and then, if command1 has succedeed, command2

command & – executes command at the background of terminal

command1; command2 – executes command1 and command2, even if command1 hasn’t succedeed


Aug 30

I’m presenting here some text file manipulation commands with examples of usage. I want to enlarge on cat, tac, uniq, sort, head, tail, tr, wc and cut. Read More