≡ Menu

Linux and Unix Commands

Tips and tricks about Linux, OS X, *BSD and Unix commands. Includes commands, syntax, hacks and much more for both new users and sysadmins ( rss feed ).

CentOS / RHEL: See Detailed History Of yum Commands

I would like to see detailed information on the history of yum transactions such as updates, deleted packages, and other information. How do I see history of yum commands on CentOS / RHEL 6.x based server? How do I undo or redo or rollback packages using yum command?
[click to continue…]

Mac OS X: Install wget Network Downloader Utility

I recently learned that "wget" can continue getting a partially-downloaded (resume download) file. I am unable to find wget command on Mac OS X. How do I install install wget on Mac OS X (Mountain Lion/ Mavericks / Snow Leopard)? How can I install wget in Mac OS X without 3rd-party repo such as Homebrew or MacPorts?
[click to continue…]

What Does –– (double dash) Mean In SSH Shell Command?

I see lots of seasoned admins and cloud provider wrapper scripts use ssh client command as follows in shell:

ssh nixcraft@server1.cyberciti.biz --

What the double -- (dash) does here? Why it is used in this shell command and why not just use the following?

ssh nixcraft@server1.cyberciti.biz
[click to continue…]

Mac OS X: Install Go Programming Language

How do I install Go language on Apple Mac OS X? How to setup GO lanuage on Mac OS X? How do I install Go language version 1.2+ on OS X?
[click to continue…]

HowTo: Upgrade CentOS Linux 6.4/6.3/6.2/6.1/6.0 to v6.5

CentOS Linux v6.5 has been released and available via repos for immediate update. The new version includes several hundred bug fixes for, and enhancements to the Linux kernel. How do I upgrade from CentOS Linux version 6.0 / 6.1 / 6.2 / 6.3 or 6.4 to the latest version 6.5?
[click to continue…]

OpenBSD: Reload / Restart / Stop dhcpd Server Command

I manage MS-Windows server and recently started to play with OpenBSD server. How do I reload or restart the dhcpd server on OpenBSD using shell command line option?
[click to continue…]

HowTo: Unpack .tgz File On Linux

I am a new Linux user. I am having problem with the Terminal. How do I unpack .tgz (tar.gz) file on Linux using command line options?
[click to continue…]

WordPress MySql Statement To Delete All Pending Comments

I have over 1800+ pending comments and most of them are spams in WordPress based blog. How do I delete all (mass delete) the pending comments using sql statements?
[click to continue…]

Unix / Linux: cat .GZ Compressed Text File On Screen

To save the disk space on my Linux based nas (network storage server), I have compressed thousands of reports[0-1000].txt files using gunzip program. However, I need to cat .gz file (or open in vim text editor) for reference purposes. I have a log files stores on my nas server in compressed format using gzip command. How do I display compressed Apache log file without using cat command? How to display the contents of gzip text files in screen without unzipping?
[click to continue…]

Ubuntu: Stat / Stop / Restart Iptables Firewall Service

I am a new Ubuntu Linux version 12.04 LTS user. How do I stop or start iptables based firewall service on Ubuntu Linux using bash command line options?
[click to continue…]