Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] The Mother of All (bash) Commands



On Monday 17 March 2008 20:04, Joe Larabell wrote:
>>    (cd /src ; tar -cf - .) | (cd /dst ; tar -xvpf -)
>
>So long as dst isn't a symlink to src ;-)...
>(Yes, I did that once without thinking. It resulted in a tree full of
>zero-length files -- with permissions properly preserved. Besides, if
>both paths are on the same machine, doesn't 'cp -a' do just as well?)

Ouch. Did you have backups?

I'm fond of tar over "cp -a" because it prints out the file names as it 
copies them so i have an idea how far along it is. But if not copying 
much stuff, cp is certainly easier. And i prefer tar over rsync for 
basic copying because tar is faster.

------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links