Mailing List Archive


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

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




Closely related is a fast and easy way to copy directory trees while
preserving permissions:
   (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?)

---
Joseph L (Joe) Larabell            Never fight with a dragon
http://larabell.org                     for thou art crunchy
                                  and goest well with cheese.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links