Echo to pipe sudo tee Instead of Switching to root | Trying to change a value in proc or write a root owned file without switching to root is possible via sudo and tee. This is very useful in automation or scripts. Here’s the scoop!
Install the app symlinks to locate broken symlinks on Linux | While it is possible to use find and other bash hackery to locate broken symlinks, an easier way is to use the command line app: symlinks. Check it out!
Backup Your /etc Directory With Daily Cron Task | Here is a simple and easy way to make daily backups of your /etc/ directory!
Script to Remove Readme and License Files From Wordpress Installations | By default, Wordpress, themes, and plugins will install readme and license files which can be a source of information leakage to a hacker. Here is a quick script to remove those files!
How To Backup and Restore MongoDB | MongoDB has great management tools for an admin. Here are some tips for backing up mongo!
Add tack e x on your bash shebang | #!/bin/bash -ex | Bash scripts can use various options on the shebang (#!/bin/bash). A more common one is: ‘#!/bin/bash -ex’ Here is the scoop!
Enable Colorful Terminal in Debian and Ubuntu | Debian and Ubuntu both disable colors in the terminal by default. I’ll show you how to turn on colors for the terminal!
CentOS Linux or Ubuntu Linux – Get List of ip addresses on Server | Here’s a quick one-liner to spit out all ip addresses from ifconfig:
Use du to show directory sizes only | du can show directory sizes only. This is helpful to get a quick glance at what directories are taking up space. Here’s the command I like to use: $ du -sh * Here is what it looks like in action from /var on one of my servers: stmiller@li166-66:/var$ sudo du -sh * 38M backups 48M