Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tar command?

12 views
Skip to first unread message

SpreadTooThin

unread,
May 9, 2012, 1:04:57 PM5/9/12
to
I'm trying to backup a user account with tar.
the users home directory has symbolic links to files elsewhere.
I don't want to archive the link to the file but rather the actual file.

I used tar -chf backup.tar directory

from the man page:

-H (c and r mode only) Symbolic links named on the command line will
be followed; the target of the link will be archived, not the link
itself.

-h (c and r mode only) Synonym for -L.




Did I do this correctly?

Jim Janney

unread,
May 14, 2012, 8:05:11 PM5/14/12
to
You did. You can run

tar -tvf backup.tar

to list the contents and verify this. Any symbolic links will display
in the normal format for ls -l.

--
Jim Janney

Jim Gibson

unread,
May 14, 2012, 8:21:59 PM5/14/12
to
In article
<30331277.955.1336583097325.JavaMail.geo-discussion-forums@yndz2>,
The best way to tell is to copy the tar file to another disk or
partition and unpack it. Do you get the file or the link when you do
this?

Wes Groleau

unread,
May 15, 2012, 7:26:34 AM5/15/12
to
If you read

-L (c and r mode only) All symbolic links will be followed.
Normally, symbolic links are archived as such. With this option, the
target of the link will be archived instead.

then you wouldn't have to ask


--
Wes Groleau

You always have time for what you do first.

0 new messages