stupid cp(1) behaviour

看板FB_current作者時間14年前 (2011/12/01 19:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/5 (看更多)
is there a chance to change cp's behaviour in connection with the -R switch, so that it stops after the first error? i just ran into the following situation: 1) cp -ai bla /mnt/umass 2) i got a lot of warnings that /mnt/umass was full 3) cp -an bla /mnt/umass 4) ...that didn't work, since cp created 0 byte files for all files it couldn't copy in 1. 5) what i had to do is 'find /mnt/umass/bla -type f - size 0 -delete' and then try 3 again of course, if cp would have bailed out after the first error, there still would be one file with < actual file size. maybe the available filesize could be checked before crating the file, or another possibility: implement a new -N switch or so which isn't based on a file's existance, but a file's checksum. cheers. alex _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1ErsMoZL (FB_current)
文章代碼(AID): #1ErsMoZL (FB_current)