You may think this is a trivial issue, but it still hurts my eyes every time I see someone (youtube video or w/e) type ‘clear’ to clear the screen. When there is a faster and more elegant way: CTRL +…Continue Reading →
Lsof is a standard Linux utility that can help you troubleshoot a range of issues related to open files. If you run it without any options it will display ALL the open files in the system, which might be a…Continue Reading →
Here is a quick tip on how to make the output of some tools prettier, for example we can use the mount command which by default looks like this:
|
|
/dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) none on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev type devtmpfs (rw,mode=0755) |
Using the column command with the -t option we can…Continue Reading →
If we want to remove extra spaces in a text like this:
|
|
This is some interesting text. |
You could be tempted to use sed, but there is a simpler way using tr
And we end up with:
|
|
This is some interesting text. |
With tr you canĀ also delete…Continue Reading →
Awk comes with some predefined variables, like NF for number of fields or OFS for field separator. If you wanna know more about these ‘man awk’ and search for ‘Built-in Variables’. In this post we are going to talk about…Continue Reading →