≡ Menu

Unix Tagged Q & A

Question and answer for users of Unix-like operating systems. Topic includes – Unix commands, servers, security, networking, shell programming, troubleshooting and much more ( rss feed ).

How to install htop on pfSense firewall

I am using pfSense version 2.3.2-RELEASE (FreeBSD 10.3-RELEASE-p5). How do I install htop version 2.x on a pfSense firewall?
[click to continue…]

How to fix Httpoxy a CGI PHP/Nginx/Apache/Go application vulnerability on Linux or Unix

A serious vulnerability was discovered in how CGI scripts are used by Linux or Unix that use PHP, Go, Python, and other scripting languages. How do I fix Httpoxy a CGI application vulnerability on Linux or Unix for HAProxy, Varnish, Nginx, PHP, Go, Python, Tomcat and others?
[click to continue…]

How to get Ethernet Link Speed in MAC OS X Through Command Prompt

I‘m a Mac OS X user. How do I find out my Ethernet Link Speed in terminal using bash shell prompt? How do I see my current Ethernet connection Speed in Mac OS X?
[click to continue…]

How to gzip and keep original file on Unix or Linux command line

I would like to compress a log file using gzip Unix command line utility, and I would also like to keep the original file. However, when I use the gzip my-app.log command, results in modifying my log file and renaming it my-app.log.gz. How do I force the gzip command to keep original file while maintaining the original file on Linux or Unix-like system?
[click to continue…]

Unix / Linux: Remove duplicate lines from a text file using awk or perl

I have a text file with exact duplicates of lines. I need to remove all those duplicates lines and preserves the order too on Linux or Unix-like system. How do I delete duplicate lines from a text file?
[click to continue…]

How to upgrade OpenSSH 7.0 to 7.2 on a OpenBSD Unix and Linux

OpenSSH version 7.2 has been released. How do I install or upgrade my existing OpenSSH version to 7.2 on a OpenBSD unix operating system?
[click to continue…]

OS X install Amazon AWS command-line interface (CLI) tool

How do I setup and install the official Amazon AWS Command Line Interface (cli) on an Apple Mac OS X system?
[click to continue…]

FreeBSD find the chmod numerical value for a file or directory

I need to find out the numerical value of a file on a FreeBSD system. For example, get 644 instead of -rw-r--r-- for the /etc/resolv.conf file. Is there is a way to get this value in my bash shell script?
[click to continue…]

How to enable colorized output for the ls command in Mac OS X Terminal

I am new to Apple OS X. How do I enable colorized output for my ls command on Apple Mac OS X just like the ones that shown on my Ubuntu Linux server? How do I configure Mac OS X Terminal app to have color ls output?
[click to continue…]

How to use curl command with proxy username and password on Linux or Unix

My sysadmin provided me the following proxy details:
       IP: 202.54.1.1
       Port: 3128
       Username: foo
       Password: bar

The settings worked perfectly with Google Chrome and Firefox browser. How do I use it with the curl command? How do I tell the curl command to use my proxy settings from Google Chrome browser?
[click to continue…]