[RndTbl] command line question, cat and dd
kmcgregor at shaw.ca
Thu Aug 8 22:02:05 CDT 2002
Well, because you forgot the redirection character: ">"
> I'm trying to write the file eb-5.0.7-via-rhine.lzdsk
> to a floppy diskette in /dev/fd0.
> When I did the following command:
> cat /home/ed/eb-5.0.7-via-rhine.lzdsk /dev/fd0
cat /home/ed/eb-5.0.7-via-rhine.lzdsk >/dev/fd0
The "cat" command copies the contents of ALL of its arguments (including
the floppy, in this case) to standard output (the screen, in this case).
Don't confuse it with the "cp" (copy) command, which copies the contents
of all (except the last) of its arguments to the last argument. The
argument after the ">" is not seen by the command, since the shell does
No doubt there were some control characters in the files that put the
console into an odd state.
> the screen filled with zeros and wierd characters and
> stayed that way after the command supposedly had
> finished writting the file to the floppy. I had to boot
> <Ctrl> <Alt> <Delete> since the keyboard was useless.
> No harm done. Everything seems OK after the boot.
> Using another floppy, I tried:
> dd if=/home/ed/eb-5.0.7-via-rhine.lzdsk of=/dev/fd0 obs=18k
> No problems with dd. The copy seemed to work quicker.
> My question is, are the two commands, dd and cat, equivalent
> for writting data to a floppy? And why did cat screw up my
> Roundtable mailing list
> Roundtable at muug.mb.ca
More information about the Roundtable