|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
tar the symbolic link
Hi Experts!!
Can anyone help me out to know how can we tar the symbolic links. I would need to find the symbolic links present in the directory and then tar them out. I can find the links by find . -type l, but i need to know how to tar the symboilc link. Any help would be much appreciated.. Many thanks !! |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Normally, when tar archives a symbolic link, it writes a record to the archive naming the target of the link. In that way, the tar archive is a faithful record of the filesystem contents. `--dereference' (`-h') is used with `--create' (`-c'), and causes tar to archive the files symbolic links point to, instead of the links themselves. When this option is used, when tar encounters a symbolic link, it will archive the linked-to file, instead of simply recording the presence of a symbolic link.
The name under which the file is stored in the file system is not recorded in the archive. To record both the symbolic link name and the file name in the system, archive the file under both names. If all links were recorded automatically by tar, an extracted file might be linked to a file name that no longer exists in the file system. If a linked-to file is encountered again by tar while creating the same archive, an entire second copy of it will be stored. (This might be considered a bug.) So, for portable archives, do not archive symbolic links as such, and use `--dereference' (`-h'): many systems do not support symbolic links, and moreover, your distribution might be unusable if it contains unresolved symbolic links. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Symbolic Link Help | LAVco | Shell Programming and Scripting | 2 | 06-07-2010 03:15 PM |
| symbolic link | tonijel | Shell Programming and Scripting | 2 | 10-01-2009 06:23 AM |
| need some info about symbolic link and hard link | detective linux | UNIX for Dummies Questions & Answers | 2 | 01-08-2008 06:36 AM |
| symbolic Link | bhargav | UNIX for Dummies Questions & Answers | 1 | 10-15-2004 09:41 AM |
| 1 symbolic link to 2 different places? | Bashar | UNIX for Advanced & Expert Users | 2 | 08-27-2003 07:40 AM |
|
|