Rivalino Matias Jr. wrote: > I got a problem in cp operation. When I copy a FILE to a device with > less space than the FILE size, I get the following behavior: > > [EMAIL PROTECTED] root]# ls -l teste.zero > -rw-r--r-- 1 root root 172933632 Set 18 23:06 teste.zero > [EMAIL PROTECTED] root]# cp teste.zero ./teste.zero2 > cp: writing `./teste.zero2': No space left on device > [EMAIL PROTECTED] root]# ls -l teste.zero* > -rw-r--r-- 1 root root 172933632 Set 18 23:06 teste.zero > -rw-r--r-- 1 root root 138993664 Set 18 23:08 teste.zero2 > > The cp doesn't remove the incomplete target file in this situation.
Yes. That is very traditional behavior. > I would like to get a feedback from you if the behavior described above > is a BUG. In case positive, I'd like to propose a patch. But, but, but..., why is it a bug? The cp command tried to execute your wishes to the best of its abilility to do so. It ran into an error and reported it. It just does not feel like a bug to me. Also, the file could be precious. I may have spent hours or days copying a huge file. I don't want to lose that already spent effort by having cp remove what it already copied. The proposal makes cp less conservative in these cases. Bob _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
