Sometimes it’s necessary to quick show differences between two outputs of two Linux commands. You can dump stdout into separated files of course and process them later but fortunately there is a simpler solution.
Imagine that you want compare output of two executions of ‘ps’ command – first execution now and the second after 10 seconds. You can use ‘diff’ command to show differences side-by-side (-y option).
$ diff -y file1 file2
Now let’s replace file1 and file2 by input streams (< char) from ‘ps’ command. Continue Reading
If you are not familiar with systemd you may be surprised about new service listening on network socket – systemd-timesyncd. It’s a time sync service started after Debian update (to stretch). Continue Reading
This short article describe how to reset lost root password on Linux system. IMPORTANT: This method require physical access to the machine.
On GRUB screen select normal boot option:
Press ‘e’ to edit selected option. You will see short GRUB code.
Search for the line starting with “linux /boot/vmlinuz…” or similar depending of Linux distribution. This is the place where kernel and rootfs is selected. Change ‘ro’ option to ‘rw’ and add: Continue Reading
Bash has ability of simple string manipulation. It has a various operators which allow do some basic text operations. This short article shows how to use these features in action with Bash.
Let’s say we have a variable text:
$ text="This is a sample text."