Department of Mathematics FAS Harvard University One Oxford Street Cambridge MA 02138 USA Tel: (617) 495-2171 Fax: (617) 495-5132
FAS Computer Services to Harvard University IT: (617) 495-7777.

Floppy discs on Sun's running Solaris

After inserting the floppy in the drive, the command "volcheck -v" checks for new media and mounts the floppy. Read and write to /floppy/floppy0 as you do with any other directory. The command "eject floppy" unmounts the floppy. Don't forget this command before physically ejecting the floppy.

Floppys on Linux

With a diskette in the drive, "mdir A:" displays the content of the floppy, "mformat A:" (re)formats the floppy, "mcopy file A:" copies a file to the floppy, "mcopy A:file ." copies a file from the floppy to the current directory, "mdel A:filename" deletes a file on the floppy.
Alternatively, a floppy can be mounted on some directory "dir" with "mount /mnt/floppy dir" and read or write to that directory "dir" as usual. Before removing the disc, unmount it with "umount /mnt/floppy" Don't forget this command before physically ejecting the disc. Newer Linux distributions use automount to mount and unmount floppy discs automatically.

CD burning under Linux

CD burning can be done with programs like "cdroast". The task can be done much simpler however:
mkisofs -r -d -o cdimage.iso dir
creates an image of the directory "dir". This is then burned onto the CD using
cdrecord -v speed=8 dev=6,0 cdimage.iso
The number 6 has to be replaced by the SCSII number of your CD drive. You find out about attached SCSII devices with the command
cdrecord -scanbus
To copy a CD , use a command like
cdrecord -v dev=3,0 speed=8 -isosize /dev/hdc
where /dev/hdc is the CD-Rom containing the read CD.

Dos-Unix file conversion

Occasionionally you may need to use the dos2unix command to remove extra carriage returns and change the end-of-file character to match Unix conventions. This can be acchieved with
 dos2unix -ascii originalfile convertedfile 
The Unix command
 tr -d "
" < originalfile > convertedfile 
does the same. See the dos2unix (and unix2dos) man pages for more info.


Simplicity, Clarity, Generality B.W. Kernighan, R. Pike, in "The Practice of Programming".
Privacy
HTML CSS