Results 1 to 3 of 3
Hi all. I apologize if this is in an incorrect thread.
I'm working with an already existing TAR file and I'm trying to insert a file into a subfolder of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-20-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
TAR question
Hi all. I apologize if this is in an incorrect thread.
I'm working with an already existing TAR file and I'm trying to insert a file into a subfolder of the TAR archive. Is there a simple way to do this? I don't want to put it in the directory where the TAR is pointing and archive again because it is a long process to archive everything; I want to put it directly into the subfolder of the TAR.
I want to do something like: tar -cf test.tar:/subfolder text.txt
Thanks
- 07-20-2010 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 468
welcome to the forum
according to "man tar" you have 8 options, none of which do what you want.
the closest is -r, --append
append files to the end of an archivethe sun is new every day (heraclitus)
- 07-23-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
As tpl said, you cannot do that directly, but you can append it to the end of the archive, and it will go into the correct folder if you do it properly.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
