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