This example lists out the IPs that are on the SSH port (22) on a particular subnet. List out IPs (only) of open ssh ports
Using the Linux Shutdown Command
Here are a few shutdown examples for quick reference. Turn Server Off Immediately Restart Immediately Restart in 45 minutes Restart at next 1 am Restart
Performing a Quick nmap Ping Scan on a Subnet
This will quickly do a scan on a subnet to determine IP addresses on the network. Only Return IP Addresses If you only want to
Untar & Unzip a tar.gz File In One Step
This command will untar and unzip all files in a single step. If you’re running Linux you’ll be doing this all the time so memorize
How to Detach and Background a Running Process From a SSH Session
Sometimes you run a program at the command line and it’s running longer than you thought. You’re worried process might die if you walk away
Server to Server Copying Files With SCP
To copy files between remote servers where transfers occur on the local host you use the -3 command line switch. This is useful if server1
See Headers Only From Command Line CURL
To See headers only and not the HTML response from a web server, you can use the command line CURL program to do it. Output
How to Remove Spaces or Other Characters From File Names on Mac
Both these commands work on most Linux and OSX/Mac machines. Replace spaces with dashes in files in a directory Replace a range of characers using
Get Folder Sizes in Current Directory Ubuntu
This command will get you a -s summarized, -h human readable, listing of the . current directory and all subdirectories disk usage totaled to one
Search (Grep) Entire Hard Drive For String
This command will search through your hard drive using the string command piped to the grep command. Swap /dev/sdc for your actual drive which can