I am trying to package the files:
file1
folder2/hello
folder2/world
file3
into a tar file so they are encapsulated in a custom defined folder, so the tar -tvf archive.tar
appears as:
mycustomfolder/file1
mycustomfolder/folder2/hello
mycustomfolder/folder2/world
mycustomfolder/file3
Currently to come around this I am:
- Creating an archive(x) of
file1
,folder2
andfile3
. - Creating a
mycustomfolder
folder. - Extract the archive(x) into
mycustomfolder
- Create an archive(y) from
mycustomfolder
I can't help it think their might be one step of doing this or a better way?