PDA

View Full Version : [all variants] [SOLVED] copying a file to floppy?



lwhitney
October 20th, 2008, 06:11 PM
basic question i think...what's the difference, if any, in the following 2 commands:

cat 'some file' >/dev/fd0

and

cat 'some file' > /dev/fd0

does a space after the '>' affect the outcome?

Dr Small
October 20th, 2008, 06:12 PM
Neither will write the file to the device, although I could be wrong. Why don't you mount the floppy and then add your files to it?

jerome1232
October 20th, 2008, 06:14 PM
there is no difference between the commands but I believe dr small is correct about it not writing to the floppy.

offtopic

I always got a kick out of cat 'somelargfile' > /dev/dsp

bodhi.zazen
October 20th, 2008, 06:42 PM
Why not copy with the cp command ?


cp some_file /media/floppy/some_file

Otherwise, no in this example, the space has no effect on the command.

bumanie
October 20th, 2008, 06:46 PM
As far as I know 'cat' will 'print' to stdout, but is not able to copy files. You would be better off using the cp (copy) command. I believe the first entry without the space between > would not work if using a correct command like cp - as far as I know, there needs to be a space.

lwhitney
October 20th, 2008, 07:17 PM
thanks for the input