Date: Fri, 31 May 2002 22:13:21 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Peter Leftwich <Hostmaster@Video2Video.Com> Cc: Matthias Buelow <mkb@mukappabeta.de>, FreeBSD LIST <FreeBSD-Questions@FreeBSD.Org> Subject: Re: mv vs. tar [overlapping,same fs] Message-ID: <20020601031320.GC91922@dan.emsphone.com> In-Reply-To: <20020531224423.V64670-100000@earl-grey.cloud9.net> References: <20020530024553.GC78068@dan.emsphone.com> <20020531224423.V64670-100000@earl-grey.cloud9.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 31), Peter Leftwich said: > On Wed, 29 May 2002, Dan Nelson wrote: > > Even to different filesystems. A single process can only be reading or writing, and when it's blocked reading, it can't be writing. If you are copying files over a couple meg, it also helps to increase the buffering between the two tars by putting team (from ports) inbetween them, and raising tar's blocksize: > > ( cd /source ; tar cbf 128 - . ) | team 1m 4 | ( cd /destination ; tar xbpf 128 - ) > > Very interesting. I hardly ever use Unix's/FreeBSD's/tcsh's "-" > command line but your example makes me want to learn how to master it > :) Now does your usage work "as is" ... ie. what is with the > parentheses? If set between "back apostrophes" such as ` ` these, > would that command line work? "-" is a per-command feature. Some allow you to process stdin/stdout that way, some don't. The parens create subshells, so that the cd commands don't affect the shell you're typing in. Using backtics creates a subshell too, but would then try and execute the output of the command. In this particular example, it should do nothing, since tar doesn't normally print anything to stdout. cd /usr ; ( cd /tmp ; touch file1 ) ; touch file2 creates /tmp/file1 and /usr/file2. Take a look at the sh manpage. > Do different *mounted partitions* on one HD count as "/same/" > filesystem? Nope. Different filesystems. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020601031320.GC91922>