From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ish Rattan To: <9fans@cse.psu.edu> Subject: Re: [9fans] dumb question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 26 Jun 2002 12:08:31 -0400 Topicbox-Message-UUID: babf5558-eaca-11e9-9e20-41e7f4b1d025 On Wed, 26 Jun 2002, Andrew Stitt wrote: > On Wed, 26 Jun 2002, Nigel Roles wrote: > > > On Wed, 26 Jun 2002 08:41:06 GMT, Andrew Stitt wrote: > > > > >On Tue, 25 Jun 2002, Fco.J.Ballesteros wrote: > > > > > >> Again, from rsc tiny tools :-) > > >> > > >> ; cat /bin/dircp > > >> #!/bin/rc > > >> > > >> switch($#*){ > > >> case 2 > > >> @{cd $1 && tar c .}|@{cd $2 && tar x} > > >> case * > > >> echo usage: dircp from to >[1=2] > > >> } > > >> > > >> > > >why must i needlessly shove all the files into a tar, then unpack them > > >again? thats incredibly inefficient! that uses roughly twice the space > > >that should be required, it has to copy the files twice, and it has the > > >overhead of having to needless run the data through tar. Is there a better > > >solution to this? > > > Andrew > > > > This does not use any more space. The tar commands are piped together. > > I doubt a specific cp -r type command would be particularly more efficient. > > > > > > > > > > > i beg to differ, tar uses memory, it uses system resources, i fail to see Keep it up :-) -ishwar