Handy Commands

  • warning: Parameter 1 to theme_acidfree_print_thumb_photo() expected to be a reference, value given in /var/www/oellermann.com/includes/theme.inc on line 166.
  • warning: Parameter 1 to theme_acidfree_print_thumb_photo() expected to be a reference, value given in /var/www/oellermann.com/includes/theme.inc on line 166.

Using DVD Rewritable Media
2004-10-19

To format the medium:
dvdrecord -v speed=2 dev=ATAPI:0,0,0 blank=fast
To erase the medium:
dvdrecord -v speed=2 dev=ATAPI:0,0,0 blank=all
The write operation is as normal.

Extracting and Burning Audio CDs
2004-10-18

NB: Don't forget to think carefully about copyright and ownership issues!
To extract the image and TOC:
cdrdao read-cd --device 0,0,0 --buffers 64 --driver generic-mmc-raw --read-raw toc-file.toc
To burn the CD:
cdrdao --device ATAPI:0,0,0 --write toc-file.toc

I shamefully admit that there are some things that I do infrequently enough at the command-line that each time I need to do them, I have to figure out the command from scratch. This page aims to be a collection of useful commands I use from time to time; it's here for my copy-and-paste purposes, but if you find it useful, go right ahead!

 

Mounting the SmartMedia from my camera
2004-09-12

mount /dev/sdd1 /mnt

/dev/sdd1 corresponds to the SmartMedia slot in the multiformat card reader.

Burn an ISO Image using ATAPI burner in 2.6 Kernel
2004-06-30

cdrecord dev=ATAPI:0,1,0 speed=8 image.iso
dvdrecord -dao dev=ATAPI:0,1,0 image.iso
(my DVD recorder doesn't seem to do track-at-once)

To figure out the device, use
cdrecord --scanbus dev=ATAPI

Create ISO Disk Images
2004-06-30

mkisofs -J -r -o image.iso /path/to/data/

-J uses Joliet extensions
-r uses Rock Ridge extensions
-o specifies output file (or pipe to cdrecord)

Use rdesktop to RDP to a Windows Box
2004-06-30

/usr/bin/X11/rdesktop -a 16 -g 1024x768 targethost

-a is the bit depth
-g is the geometry

Mount a Windows Share using CIFS
2004-06-30

mount -t cifs -o username=administrator,password=passwordhere,domain=domain //targetmachine/share /mnt

I usually just use the IP address for targetmachine, as it saves fussing around with WINS etc.