Linux Commands You’ve Never Used

Technology

# lsof | grep TCP
portmap    2587   rpc  4u   IPv4     5544  TCP *:sunrpc (LISTEN)
rpc.statd  2606  root  6u   IPv4     5585  TCP *:668 (LISTEN)
sshd       2788  root  3u   IPv6     5991  TCP *:ssh (LISTEN)
sendmail   2843  root  4u   IPv4     6160  TCP badhd:smtp (LISTEN)
vsftpd     9337  root  3u   IPv4    34949  TCP *:ftp (LISTEN)
cupsd     16459  root  0u   IPv4    41061  TCP badhd:ipp (LISTEN)

Here’s a short list of useful Linux shell programs, many of which you may have never known about. I’ve got a new favorite shell command, lsof (shown above), which displays information on every open file handle. – Link.

If I could add one to the list, it’d have to be the short and sweet command line search and replace using perl:

perl -pi -e 's/searchpattern/replacewith/g' *.html

Do you have a favorite command line secret? Please share it in the comments.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK