Shell code samples (BASH)

What a Resilver Looks Like in ZFS (and a Bug and/or Feature)

/
At home I have an (admittedly small) ZFS array set up to experiment with this neat newish raid technology. I think it has been around long enough that it can be used in production, but I'm still getting used to the little bugs/features, and here is one that I just found. After figuring out that I had 2 out of 3 of my 1TB Seagate Barracuda hard drives fail, I had to give the array up for a loss and test out my backup strategy. Fortunately it worked and there was no data loss. After receiving the replacement drives in from RMA, I rebuilt the ZFS array (using raidz again) and went along my merry way. After 6 months or so, I started getting some funky results from my other drive. Thinking it might have some issue as with the others, I removed the drive and ran Seatools on it (by the way, Seatools doesn't offer a 64-bit Windows version - what year is this?). The drive didn't show any signs of failure, so I decided to wipe it and add it back into the array to see what happens. That, of course, is easier said than done.

Disabling The hald-addon-storage Service On CentOS/RedHat

The hald - Hardware Access Layer Daemon - runs several processes…

Adding Random Quotes to the Bash Login Screen

/
According to "official" system administrator rules and guidelines…

Another Bash One Liner To Delete Old Directories

We received a tip from blog readers Christian and Michael for…

One Line Linux Command to Print Out Directory Tree Listing

/
My professor sent us this little one liner (ok, I had to format…

One Line Batch Rename Files Using CSV Input File and awk

/
The Bash command environment, which is the namesake of this blog,…

Linux Command Line, Generating a Random File

/
It is very easy to create a random file using the linux command…