help-tar
[Top][All Lists]
Advanced

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

[Help-tar] Overwrite options


From: address@hidden
Subject: [Help-tar] Overwrite options
Date: Tue, 01 Nov 2016 02:56:23 +0300

Hello.
I don't know if it is a bug or something like that.
What flag should I use if I want to overwrite existing non-empty directory by symlink from my tar archive?
I've tried --overwrite flag and -U, that did not work. Tried with tar version 1.29 and 1.28.
Here is example:
 
➜  ln -s /dev/null test
➜  tar -cf archive.tar test
➜  rm -f test
➜  mkdir -p test/something
➜  tar --overwrite -xf archive.tar  
tar: test: Cannot open: File exists
tar: Exiting with failure status due to previous errors
➜  tar -U -xf archive.tar 
tar: test: Cannot unlink: Directory not empty
tar: Exiting with failure status due to previous errors
➜  rmdir test/something 
➜  tar --overwrite -xf archive.tar
➜  echo $?
0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]