Archive for May, 2005
LCOD – 5.9.05 – mounting cdrom (iso) images transparently
Posted by Jon Zobrist in Linux, Linux Command of the Day on May 9, 2005
mount -o loop /path/to/cdimage.iso /mnt/imageX
that’s it, of course you’ll need a kernel with loop support, but most modern linux’s have this built in.
This lets you save a CDR and get faster access to CD media you’ve downloaded. I use this at work to install Oracle from the hard drive remotely instead of having to be on side swapping CDROM’s.
Also, if you have a CD that you’d rather have an iso, here’s how to rip iso’s easy like..
dd if=/dev/cdroms/cdrom0 of=/path/to/cdimage.iso
you may went to grep cdrom /etc/fstab to see what the device is of your cdrom. Also, I’ve had some problems with this failing with copy protected type cdroms, sometimes if you mount it first it works better, sometimes worse.
LCOD – 5.2.05 – Removing ^M from WINDOWS text files
Posted by Jon Zobrist in Linux, Linux Command of the Day on May 2, 2005
This you don’t type ^ you hit CONTROL.
:%s/^V^M//
so you type
:%s/CONTROL-V CONTROL-M//ENTER
ALSO:
You get a file with ^M at the end of every freaking line, and open it up in vi and want to just rip off the last line
This you don’t type ^ you hit CONTROL.
:%s/^V^M//
so you type
:%s/CONTROL-V CONTROL-M//ENTER