≡ Menu

BASH Shell

How to Prevent & Disable Mac OS X From Sleeping From the Command Line Terminal Application

I‘m running a process to complete backup and covert images in Mac OS X laptop. I do not wish to disable sleep manually from my OS X power options (Energy Saver). How do I temporarily prevent a Mac from sleeping while my process is still active in Mac OS X Unix operating systems? How can I prevent the system from sleeping temporarily from the command prompt?
[click to continue…]

How To Find My Public IP Address From Command Line On a Linux

How do I find out my public IP address on the Linux and OS X Unix command line to use with my own bash shell script without using third party web site? Is there command-line option which will show my dynamic IP address on a Ubuntu or Fedora Linux?
[click to continue…]

How To Run Cronjob Script On The Last Day Of a Month

How to execute script on the last day of a month on Linux or Unix bash shell? How do I run a disk usage or custom reporting shell/perl/python script on the last day of a month on a Linux or Unix-like systems?
[click to continue…]

How To: Temporarily Clear Bash Environment Variables on a Linux and Unix-like System

I‘m a bash shell user. I would like to temporarily clear bash shell environment variables. I do not want to delete or unset an exported environment variable. How do I run a program in a temporary environment in bash or ksh shell?
[click to continue…]

How To Find the WiFi Password on Mac OS X

I‘ve MBP 13″ laptop. How can I find out the Wifi password on Mac OS X using command line and GUI options?
[click to continue…]

Bash: Find out the exit codes of all piped commands

How do I get exit status of process that’s piped to another (for e.g. ‘netstat -tulpn | grep nginx‘) on a Linux or Unix-like system using a bash shell?
[click to continue…]

Linux/Unix: How To Extract and Decompress a .bz2/.tbz2 File

I‘ve a file called foo.bz. How do I extract or decompress a .bz2 file on a Linux or Unix-like systems using command line options?
[click to continue…]

How to run sudo command without a password on a Linux or Unix

I‘m a new Unix system user. How do I use sudo command without a password on a Linux or Unix-like systems?
[click to continue…]

Ubuntu Linux: Edit and Open Files That Require Administrator Privileges

There are certain files in Ubuntu Linux (or Unix-like systems) that only root user access or edit. How can I edit and/or open files that requires admin (root) access on a Ubuntu Linux?
[click to continue…]

Bash: Reissue And Repeat A Long Command Without Retyping It on a Linux, OS X & Unix

I‘m a new Ubuntu Linux user. In Linux, Apple OS X or Unix-like systems, how do I reissue or repeat a long command without retying it?
[click to continue…]