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
How to Backup and Restore with mysqldump
Backing up and restoring a MySQL or MariaDB database is super easy. I’ve listed out a few different ways you can do it. Example MariaDB/MySQL
Port Scan the Entire Internet in 5 Minutes?
One of my favorite sub-reddits is /r/coolgithubprojects. I check it out a few times a week looking for interesting open source projects. One interesting project
Using netstat to Monitor Connections and DDoS on Your Server
Netstat is a wonderful Linux command to peak into networking processes on your server. Combined with other commands such as sort netstat can become extremely
How To Dump a Man Page to a Text File
Dumping a man page is easy, just redirect the output to standard outvia a bash as below.
How to Update Brew and Upgrade all Packages on OSX
I used to run Linux Ubuntu up until a few years ago as my laptop. But I find the hardware and software on a Mac
Search Inside Text Files With Grep
Grep is too important not to know for Linux sysadmins. Grep is commonly combined with other commands via pipes to search and filter standard output.
Several Ways to Run Queries from Bash
In some of these examples, particularly the remote server I’ve included usernames and passwords, but you might not need it locally, depending on your mysql