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*

5
  • 13
    Requires GNU tar? Mac default bsd tar does not have this option. Commented Apr 18, 2019 at 18:12
  • 4
    Yes, this should be mentioned more clearly. Commented Nov 7, 2019 at 17:36
  • 5
    GNU Tar 1.26 does not have the --one-top-level option, it appears. Commented Mar 16, 2020 at 0:10
  • 2
    --one-top-level is available as of GNU Tar 1.28. Commented Apr 1, 2023 at 11:03
  • 1
    if it needs to be unarchived to someother destination then use -C option tar --use-compress-program=unzstd -xvf recipe-zlib.tar.zst --one-top-level -C destination_path Commented Jan 25, 2024 at 9:13