Tar soft link files


















What I did is How to list all symbolic link? Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Hi all, Can anyone please confirm if the command below is the only way that I can get what the symbolic link is set to? Symbolic Link Help. Hello All, This may be a silly question to some but I am really stuck. Hi, i am trying to create sym links on sles 11 , but it seems i am doing something wrong.

How to copy a symbolic link. Hi I am trying to find a copy command that will copy a symbolic link itself and not what the link is actually pointing to. Create Symbolic Link. I am Solaris korn shell. I want to create a symbolic link. But it is working fine when i goto scripts directory and cretae the symbolic link. You could do this, to supply tar with a list of all files inside protTests except those which are symlinks: find protTests -maxdepth 1 -mindepth 1 -not -type l -print0 tar --null --files-from - -cvf protTests.

A simpler command like this would have neither of those problems: tar -cvf protTests. Improve this answer. Celada Celada Tar has no option --files-from , this is an option from gtar, so of you give such an advise, better mention that this is gtar specific. Find has no primary -not , this is another non-portable GNUism. In general, it is a bad idea to use a separate find call. This may give problems with funny characters in the filename and it definitely gives a low performance as both find and tar need to scan the filesystem.

These problems do not apply to programs like star that use libfind and thus have the find code incorporated. Let me add another general hint: When giving an advise that is specific to a vendor specific variant of a UNIX program, it is good practice to mention the vendor and that it is vendor specific.

This can typically be done by using the official names of the software, e. You're right, schily, this is a GNU-specific solution. Your answer based on star is a good alternative and I have upvoted it for that reason. I also agree with the "funny characters" objection but since GNU tar does not have a -0 option it's a tradeoff.

I do not agree with the performance objection, that's really of no consequence in this situation. This works only with root or privileged user but not as normal user, how to make tar to do same as normal user. This post really made my day! Save my name, email, and website in this browser for the next time I comment.

If you go through the man page of tar man tar -h, --dereference follow symlinks; archive and dump the files they point to So, as of now we need to use -h argument along with tar command but how and when?

Thank you. Improve this question. Do you want the final tarbal to have the soft-links or the target file of those links. It's unclear in your question. Add a comment. Active Oldest Votes. Improve this answer. Ignacio Vazquez-Abrams Ignacio Vazquez-Abrams k 8 8 gold badges silver badges bronze badges. Then there are two cases: If your symlink is a full pathname, it might be broken when untarred. If your symlink is a relative pathname, under the folder you are tarring, it will work fine when extracted.

Scott



0コメント

  • 1000 / 1000