I want to append files to foo.tar
:
tar -rvf foo.tar IMG_1807.MOV
this works, but when I want to remove files:
tar -dvf foo.tar IMG_1807.MOV
doesn't work. It shows the output:
Terminal:~/Desktop$ tar -dvf foo.tar IMG_1807.MOV
IMG_1807.MOV
Terminal:~/Desktop$ tar -tvf foo.tar
-rw-rw-r-- user/user 33084363 2018-12-19 03:02 IMG_1807.MOV
but doesn't delete anything. What should I do?
Second, how can I add or remove files from file.tar.gz
or file.tar.bz2
or file.tar.xz
? Is there any command or I should always untar and tar again?
Edit:
Third: How to extract a specific file from a zipped file? Or how to extract from tar in a specific location? This did NOT work:
tar -xvf foo.tar IMG_1807.MOV -C /path/to/destination