UNIX – SED Remove Comment Lines
This script will remove all lines that start with # along with all comments. Whatever file you choose I suggest you view first then execute
Posts in this category are specific to Ubuntu and may or may not work on Zorin OS, Raspbian, and Debian or other UNIX based systems.
This script will remove all lines that start with # along with all comments. Whatever file you choose I suggest you view first then execute
As much as I like Oh My Zsh sometimes you have to go back to original terminal as not all things are supported. NOTE: This is part of a setup I do for new computers, see HomeBrew – Mac OS Setup For more information on Oh My Zsh, see https://github.com/robbyrussell/oh-my-zsh
If you manage a list of domains it’s sometimes helpful to have a script like this to check the information from time to time. I plan to clean this up in time but for now this works. First create a text file like below that has domains in it Then create and run this bash/shell…
When you need to create a log file or some dated archive The format can be modified slightly based on date formatting.
Reference: http://unix.stackexchange.com/questions/84814/health-check-of-web-page-using-curl
When working with two or more servers it’s important to know that the files are the same on all servers involved. This script will assist in showing the differences between the servers without actually acting on the differences (will not copy any files). Key part of the command below is “-n, –dry-run perform a trial…
Working on a backup and restore script I often need only to know what the latest backup/archive file is, this command helps you learn that.
Secure Copy (SCP) is a useful UNIX command that allows you to securely copy files and directories between your local machine and a remote computer. In the examples below “-P 22” is not actually needed if the SSH port is 22. Many of the servers I connect to have a different port for security reasons…
Coming from Windows I sometimes still have the desire or need for a desktop shortcut/symlink. There are two easy options for this Right click the application, select “Make Alias” and drag that alias to the desktop and potentially rename it at one point or the other. Open Terminal (Applications – Utilities) and run a command…
Sometimes you really need to find a file that has certain text in it, these commands will help provided you have an idea of the directory or the string