Asis Patra


Bengaluru, India

Useful Linux Commands

by on September 22, 2022 at 3:12 pm

Find who is logged on and What they are doing

$ w
 10:11:28 up 14 days,  2:33,  1 user,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
asis     pts/0    XXX.XXX.XXX.XXX  10:11    0.00s  0.05s  0.01s w

Kill tty Connections

$ pkill -9 -t <TTY>

# Example
$ pkill -9 -t pts/0

Find Common Elements Between Two Lists

comm is great, but indeed it needs to work with sorted lists.

$ comm -12  <(ls one) <(ls two)

Alternative with sort:

# Intersection of two lists:
$ sort <(ls one) <(ls two) | uniq -d

# Symmetric difference of two lists:
$ sort <(ls one) <(ls two) | uniq -u


$ curl "" -o reflector
$ sudo mv reflector /usr/local/bin/
$ sudo chmod a+rx /usr/local/bin/reflector

# Usage
$ reflector <FILENAME> <NEW_FILE_NAME>

Category: Linux

Tags: , , ,


Build column Command on Linux

by on September 18, 2022 at 7:15 pm

You might have bsd version column on your system, which might be an older version. You can build column using the following steps. Build column  Read More »

Category: Linux

Measure Network Performance with qperf

by on September 22, 2022 at 3:51 pm

qperf measures bandwidth and latency between two nodes. It can work over TCP/IP as well as the RDMA transports. How to install qperf? On CentOS/RHEL8, qperf is available from the EPEL repository. Install it like this: The Ubuntu/Debian repositories do not have qperf, so you’ll need to build it from source. Open the firewall on the Server On […]  Read More »

Category: Linux