Add a directory ~/some-other-directory
to an existing files.tar
archive.
You can use this short tar command.
tar -rvf files.tar ~/some-other-directory-somewhere
Or this more verbose tar command.
tar --append --verbose --file files.tar ~/some-other-directory-somewhere
You can append multiple directories onto an exsiting tar archive by simply chaining the directories.
tar --append --verbose --file files.tar ~/some-other-directory-somewhere ~/another-directory-somewhere
-r
or --append
tells tar to append to an existing archivev
or --verbose
tells tar to produce verbose outputf
or --file
tells tar that the next parameter will be the tar file to create, extract, append to, list, etc.