Suitable for some file export, but do not want users to know the requirements of file storage path information on the server.
"Tar article"
Use commands directly under Linux
Tar jcvf file.tar.bz files
When compressing the files directory, if the current files path is under/home/www/files, the compressed file.tar.bz2 will contain the absolute path of files;
Solutions
Tar jcvf file.tar.bz2-c/home/www files
After this compression, it is possible to properly a relative path of the compression package, directly remove the/home/www path is not compressed.
Tar in the Unix/linux world although popular, but in the end user side, the ZIP format is still absolute mainstream, so, it may be more useful in the ZIP format.
"Zip article"
Use the-J parameter: Do not process the directory path of the compressed file
ZIP-QJ File.zip/home/www/files
Compression packages that do not contain path information under Linux