Shrinking a PDF with Ghostscript is easy in Linux. Below are 3 ghostscript commands to shrink PDFs to a few different levels. screen – lowest
How to Remove Duplicate Lines From a Text File In Linux
You can combine the sort and uniq command line programs to remove duplicate lines from a text file. In the example below, it will produce
How to Jump to a Line Number in VI Editor
To go to a specific line number in VI, first, make sure you’re not in editing mode by hitting ESC. Next type the line number
Find Active SSH Servers on a Subnet
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