Reputation: 5210
I'm running the following command to create a backup tarball of a file or folder:
system("tar -pczf /home/var/www/temp /home/var/www/folder/to/backup");
It works great, but when I extract I get the path all the way back to the root of the server (/home/var/www/folder/to/backup).
I'm curious if there's a command or flag which will allow me to create the tarball so it only contains the '/folder/to/backup' part.
Upvotes: 1
Views: 517