Date: Tue, 01 Aug 2006 23:44:51 +0200 From: Ivan Voras <ivoras@fer.hr> To: freebsd-hackers@freebsd.org Subject: Re: [PATCH] adding two new options to 'cp' Message-ID: <eaoi0e$tfu$1@sea.gmane.org> In-Reply-To: <17615.40148.872008.53973@bhuda.mired.org> References: <200607271150.k6RBoM9p031745@lurza.secnetix.de> <44C8FB65.9020102@FreeBSD.org> <44CE03D2.2050803@centtech.com> <17614.4005.407223.621637@bhuda.mired.org> <44CE199C.2020500@centtech.com> <17614.8289.134373.387558@bhuda.mired.org> <96b30c400607310847s1d2f845eo212b234d03f51e9a@mail.gmail.com> <17614.10982.499561.139268@bhuda.mired.org> <ealpn1$lan$1@sea.gmane.org> <20060801072611.GA717@turion.vk2pj.dyndns.org> <20060801171150.GB3413@megan.kiwi-computer.com> <17615.40148.872008.53973@bhuda.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer wrote: > I always think of cp as a tool for making *copies of files*, not for > creating an archive of a directory tree. We've got lots of tools that > do the latter. Do we really need another one? But, but, but - I only asked for cp to be able to copy my sparse files as sparse files, not do magic with them :) The side-effect that it will sparsify other files is both unavoidable and actually useful. OTOH, for copying/sparisfying single files, dd should be fixed. vsdev:/tmp> l total 2 drwx------ 2 ivoras wheel 512 Jul 9 00:08 mc-ivoras/ vsdev:/tmp> dd if=/dev/zero of=file bs=1024 seek=100 count=1 1+0 records in 1+0 records out 1024 bytes transferred in 0.016648 secs (61509 bytes/sec) vsdev:/tmp> l total 8 -rw-r--r-- 1 ivoras wheel 103424 Aug 1 21:40 file drwx------ 2 ivoras wheel 512 Jul 9 00:08 mc-ivoras/ vsdev:/tmp> du -shc file 6.0K file 6.0K total vsdev:/tmp> l total 8 -rw-r--r-- 1 ivoras wheel 103424 Aug 1 21:40 file drwx------ 2 ivoras wheel 512 Jul 9 00:08 mc-ivoras/ vsdev:/tmp> dd if=file of=file2 bs=1024 conv=sparse 101+0 records in 101+0 records out 103424 bytes transferred in 0.130216 secs (794250 bytes/sec) vsdev:/tmp> l total 110 -rw-r--r-- 1 ivoras wheel 103424 Aug 1 21:40 file -rw-r--r-- 1 ivoras wheel 103424 Aug 1 21:41 file2 drwx------ 2 ivoras wheel 512 Jul 9 00:08 mc-ivoras/ vsdev:/tmp> du -shc file* 6.0K file 102K file2 108K total
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eaoi0e$tfu$1>