Is Apache or some other process using most of your CPU but you have no idea why? I have the solution for you! Linux has some low-level troubleshooting tools that will let you investigate the issue and find out what’s going on. One of those tools is strace, which will capture all the system calls […]

Read More

There is a number of tools you can use in Linux to see what is going on your machine at the network level, one of the most common is netstat. This command will show you all the connections on your system, including some that you may not be interested in, like UNIX sockets. There are […]

Read More

In this post you will learn about bash expansions, you probably already used them if you have done something like “ls *.txt”. Basically the shell does some processing on the command line before actually executing it, which enables us to do a number of things. Here is a small cheatsheet of the most useful expansions: […]

Read More

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:

Using the column command with the -t option we can apply some formatting so it is more readable:

Much better, isn’t it? Man page […]

Read More

If we want to remove extra spaces in a text like this:

You could be tempted to use sed, but there is a simpler way using tr

And we end up with:

With tr you canĀ also delete characters instead of compressing them. Let’s say we wanted to get rid of the vowels. […]

Read More