Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


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

tar -x without clobbering directories



On Tue, May 5, 2009 at 4:21 PM, Tom McLaughlin
<tmclaugh-VThn6mlTRQFChFL4AGkBsw at public.gmane.org> wrote:
>
>
> Just curios, are you saying that when extracting Drupal everything under
> sites/ is wiped out? ?For example any files created by you and not in the
> ?Drupal tarball are gone after extraction? ?That's the sense I got from your
> email but could not reproduce on Fedora 10 with tar 1.20. Also
> --overwrite-dir does not say it is the default behavior in the man page I
> have.
>
> tom
>
> --
> | tmclaugh at sdf.lonestar.org ? ? ? ? ? ? ? ? tmclaugh at FreeBSD.org |
> | FreeBSD ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://www.FreeBSD.org |
>
>

That is what happened...when I used --exclude, it skipped extracting
the "sites" directory from the tarball (like I wanted), but also
deleted the existing "sites" directory in the target folder as if
"that shouldn't be there".  I did a git status and sites was gone

I just thoroughly retested the exact history from the same machine
(plus another machine), and the sites folder does NOT get removed nor
clobbered.  So it looks like the tar one-liner works but now I can't
explain what happened to me the first time around.  I even rechecked
git status to see if somehow it was an issue with git getting fooled.


  434  tar x --show-omitted-dirs --exclude sites --directory
../work/gr/iic-drupal/ --strip 1 -zf drupal-6.11.tar.gz
  435  cd ../work/gr/iic-drupal/
  436  ll
  437  git status
  438  git checkout sites
  439  ls sites/
  440  ls
  441  cat UPGRADE.txt
  442  git status
  443  git diff .htaccess
  444  git commit -a -m 'adds changes in Drupal 6.11 security release'


-- 
Greg Rundlett
Web Developer - Initiative in Innovative Computing
http://iic.harvard.edu
camb 617-384-5872
nbpt 978-225-8302
m. 978-764-4424
-skype/aim/irc/twitter freephile
http://profiles.aim.com/freephile







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org