isn't quite ashamed enough to present

jr conlin's ink stained banana

:: Unix Commands I Always Forget

And now, for a list of Linux commands i always forget about:

To get the GUID of a drive (so that a given hard drive ALWAYS mounts up under a given directory):
blkid /dev/drive
(and insert into /etc/fstab as:
UUID=UUID mount path ext3 defaults 0 2

To compare two different directories:
diff -rq dir1 dir2 > dirs.diff

To copy ginormous files:
rsync --inplace --progress --checksum --sparse --whole-file !*

Dav points out that recent versions of rsync don't allow both inplace and sparse. Too bad, really, since previously rsync would automatically handle them. Inplace is good for files (or devices) where you need the disk to flush often (e.g. USB drives), "sparse" is good for large, mostly empty files (like MySQL DBs).

After mounting a drive, make it available for NFS export by adding it to /etc/exports
/d2/ *(rw,sync,no_subtree_check)
and then running
exportfs -a
(This will keep NFS from reporting stale handles and locking on requests, even after a reboot.)

i've also learned to really appreciate Audio::WMA and MP3::Info to help me identify duplicate tracks (and which one to nuke).

Now, i wonder how long before i forget that i created this so i could remember the commands i forget.

(Hopefully, slightly longer than it took for me to figure out what the hell that last sentence meant.)

Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org Henriette's Herbal Blog lynne ydw i slumbering lungfish
geek jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling
news ars technica search engine watch

Powered by WordPress
Hosted on Dreamhost.