Archive for July, 2012

If a file exists then do (something) in bash

If you need to determine in a file exists in a directory use the first example. Credit to¬† for a simple answer. #!/bin/bash if [ -f path/to/file.txt ] then echo “file exists” fi If you need to know if it does not exist use this: #!/bin/bash if [ ! -f path/to/file.txt ] then echo “file […]

My Raspberry Pi has arrived!

I’ve been (im)patiently waiting for my Raspberry Pi to show up since mid-March & can’t wait to get started playing with it. My goal is use it as the controller for a compact NAS despite the potential bandwidth issues with USB drives as the media. I’ll probably do the first backups with the drive(s) connected […]