How to create a nifty terminal theme inside a Linux terminal

Many of you Linux junkies will probably spend most of your time in terminals. So you may be wondering how to spice up the plain old boring-looking terminal environment. If you are looking to enhance the look of your terminal window, one way is screenFetch. According to its creator, screenFetch is a “bash screenshot information […]
Continue reading…

 

How to measure packets per second or throughput on high speed network interface

There are many traffic monitoring tools available on Linux, which can monitor/classify network traffic, and report real-time traffic statistics in fancy user interfaces. Most of these tools (e.g., ntopng, iftop) are powered by libpcap, which is a packet capture library used to monitor network traffic in user space. Despite their versatility, however, libpcap-based network monitoring […]
Continue reading…

 

How to check if a file exists on a remote server

There are circumstances where you want to test if a file exists somewhere on a remote Linux server (e.g., /var/run/test_daemon.pid), without logging in to the server interactively. For example, you may want your script to behave differently depending on whether or not a specific file exists on a remote server. In this tutorial, I will […]
Continue reading…

 

How to parse JSON string via command line on Linux

If you often deal with JSON-formatted texts from the command line or in shell scripts, you may wonder if there is any command-line utility which can parse JSON string. A command-line JSON parser can be handy when you test or debug JSON web services. You can feed JSON-formatted responses from web services into the command-line […]
Continue reading…

 

How to kill multiple processes at once with grep

There are cases where you want to kill multiple processes that match a certain pattern in their command line strings. For example, suppose you want to kill all processes that are running commands with keyword “jppf” in their arguments. $ ps aux | grep jppf xmodulo 3324 0.1 2.9 156524 15176 pts/0 Sl 22:16 0:01 […]
Continue reading…