[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: premature cp exit?



    "Try" == Try KDE <trykde@rogers.com> writes:

    Try> $ mount /mnt/floppy
    Try> $ cp some-big-fie  /mnt/floppy

    Try> What I found is that cp returns immediately, and the floppy
    Try> drive's LED doesn't turn off until 5-10 seconds later. It
    Try> seems to me that cp copied the content to kernel and returned
    Try> without it being committed to the physical media. This could
    Try> be a wrong behavior considering that a bad media may later
    Try> fail the operation. What do you guys think about it? Is there
    Try> an option or something to force cp to wait?

This is A Good Thing most of the time, and is exactly how the UNIX I/O
system works normally. It is the reason why you are supposed to shut
down the system gracefully, and not eject floppies before unmounting. 

The option you want is on mount, not on cp.

  mount -o sync /mnt/floppy

It still will not prevent you from ejecting the floppy too
early ;-)

Nope, I did not try it (just don't have floppies handy right now). If
it does not work be sure to holler, I'd be interested in knowing.

Cheers!
Shyamal



Reply to: