I'm creating a tar file from a directory as such /home/user/bla/mydir/
Now I want to create a tar.gz file which starts from mydir/, not having directory list of the archieve content listing starting from /home/user/bla/mydir/.
How can this be done?
Here is my original one:
tar = tarfile.open("/home/user/mytar.tar.gz", "w:gz")
tar.add("/home/user/bla/mydir/")
tar.close()