1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 12:02:08 +02:00

tar: add a relative paths example (#3867)

Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
Paul S 2020-02-25 19:04:41 +00:00 committed by GitHub
parent eec1815b50
commit bb264b81b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,10 @@
`tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` `tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}`
- Create a gzipped archive from a directory using relative paths:
`tar czf {{target.tar.gz}} -C {{path/to/directory}} .`
- Extract a (compressed) archive into the current directory: - Extract a (compressed) archive into the current directory:
`tar xf {{source.tar[.gz|.bz2|.xz]}}` `tar xf {{source.tar[.gz|.bz2|.xz]}}`