The tar command, when packaged, is packaged with an absolute path compression and, when not in a special parameter, the path at which the package is created under the current path and prompts for warning:
Tar:removing leading '/' from member names
The test is as follows:
1[Email protected] ~]#Tar-ZCVF rsyncsh.Tar. Gz/home/lzn/rsync50.SH2 Tar: Removing leading '/'From member names3/home/lzn/rsync50.SH4[Email protected] ~]#ls5Anaconda-ks.cfg data Desktop Documents Downloads include Music Pictures post-InstallPost-Install. Log Public Rsyncd.passwordRsyncsh.tar . GZ Templates Videos6[Email protected] ~]#Tar-ZXVF rsyncsh.Tar. GZ7Home/lzn/rsync50.SHTen[Email protected] ~]#ls OneAnaconda-ks.cfg Data Desktop Documents DownloadsHomeInclude Music Pictures post-InstallPost-Install. log public Rsyncd.password rsyncsh.Tar. GZ Templates Videos A[Email protected] ~]#ls-R home/ -home/: - LZN the -home/LZN: -Rsync50.SH
The use of special parameters-P can be compressed at the time of the '/' compression, decompression when the direct decompression to the absolute path of compression.
Use the special parameter-C to specify that the path be extracted.
The TAR command under Linux