Re: [PATCH] adding two new options to 'cp'



At 12:07 PM +0200 8/1/06, Ivan Voras wrote:
Peter Jeremy wrote:

Note that it isn's possible to accurately distinguish
between a block of NULs and a hole in the file through
the filesystem. The only way to accurately copy a
sparse file is with dump/restore.

Hence the need for an explicit switch.

The point is not that you need an explicit switch, the
point is that you have to add a lot of code to 'cp' for
'cp' to do the job correctly. You are changing the
nature of how the command works. I very much doubt you
can implement that *correctly* in a mere 160 bytes of
additional object code!

Note:
-r-xr-xr-x 1 root wheel 15348 [date] /bin/cp
-r-xr-xr-x 2 root wheel 44288 [date] /sbin/dump
-r-xr-xr-x 2 root wheel 58736 [date] /sbin/restore

I realize a lot of these decisions are somewhat subjective.
"One person's feature is another person's bloat". But in
the case of this specific example, I (personally) would
not want 'cp' to implement every detail which is already
handled by dump/restore.

--
Garance Alistair Drosehn = drosehn@xxxxxxx
Senior Systems Programmer or gad@xxxxxxxxxxx
Rensselaer Polytechnic Institute; Troy, NY; USA
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PATCH] adding two new options to cp
    ... of NULs and a hole in the file through the filesystem. ... to accurately copy a sparse file is with dump/restore. ...
    (freebsd-hackers)
  • Migration planning - old system to new
    ... but I'd like to update my UID scheme from a pre-standard ... so that I can do a dump/restore on "home" without messing things ... of /var/mail (since I'm moving it from a part of the /var filesystem ... Do the real switch ...
    (freebsd-questions)