05-19-2008
381,
8
Join Date: Nov 2006
Last Activity: 7 October 2015, 6:30 AM EDT
Posts: 381
Thanks Given: 3
Thanked 8 Times in 8 Posts
actually I just want to add. For safety reasons whenever you tar anything always try to have the practice to specify relative instead of absolute path.
example:
absolute path will be tar cf /tmp/abc.tar /etc
relative path will be tar cf /tmp/xyz.tar ./etc <-- "."
The danger of using absolute path is when you un-tar the file it will overwrite existing folder.
example:
cd /tmp
tar xf abc.tar will extract and overwrite existing /etc
tar xf xyz.tar will extract into /tmp only