Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Also not that it gives execute permissions to non-directory files. Commented Mar 9, 2020 at 9:40
  • 1
    It's also a bit dangerous in that chmod follows symlinks. So if a user is tricked into unpacking an archive that contains a symlink to ~/.profile for instance, that would have bad consequences. Commented Mar 9, 2020 at 9:41
  • I've added the (GNU-specific) -d '\n' so it doesn't fail with archive members that contain whitespace or quoting characters, but newline characters are still a problem. Commented Mar 9, 2020 at 9:42
  • 1
    Nice one. In our case the tar we have to extract are safe on that point of view but it is a valid point and nice update. Just as info I tried both tar with xargs and star the first seems more performant Commented Mar 9, 2020 at 10:05