Author Archive

Google Profile

Back to the Basics with rm

Wednesday, June 10th, 2009
No Gravatar

At the Manitoba Unix Users Group last night, a common problem was presented as a warning to people new to unix based operating systems. The message was “All operating systems will let you shoot yourself in the foot. Unix based systems will let you shoot yourself in the foot really fast.” One of the examples was the dangers of using root while executing recursive delete commands.

Say  you wanted to get rid of all the hidden files in your directory (those starting with . for example .htaccess and .htpasswd)

DO NOT USE “rm -Rf .*” AS ROOT and be careful as a normal user!

Is my backup complete?

Tuesday, May 12th, 2009
No Gravatar

Many server administrators use rsync to synronize files between local as well as offsite media. Often it’s used within a scheduled backup script. But how can you tell if rsync was successful or not without looking through the output of the command in detail? If it wasn’t successful, how can you tell if it was an error or warning that you would normally ignore (for example, the “Partial transfer due to vanished source files” error that happens in  maildir files that come and go normally during the backup and don’t need to be backed up)? Here’s an example script that can help.