mirror of https://github.com/CrimsonTome/tldr.git
tar: add brackets explaining mnemonics (#5083)
Co-authored-by: Axel Navarro <navarroaxel@gmail.com>translation-badges
parent
325a88c924
commit
f72524cdb2
|
@ -4,34 +4,34 @@
|
||||||
> Often combined with a compression method, such as gzip or bzip.
|
> Often combined with a compression method, such as gzip or bzip.
|
||||||
> More information: <https://www.gnu.org/software/tar>.
|
> More information: <https://www.gnu.org/software/tar>.
|
||||||
|
|
||||||
- Create an archive from files:
|
- [c]reate an archive from [f]iles:
|
||||||
|
|
||||||
`tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}`
|
`tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}`
|
||||||
|
|
||||||
- Create a gzipped archive:
|
- [c]reate a g[z]ipped archive from [f]iles:
|
||||||
|
|
||||||
`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:
|
- [c]reate a g[z]ipped archive from a directory using relative paths:
|
||||||
|
|
||||||
`tar czf {{target.tar.gz}} -C {{path/to/directory}} .`
|
`tar czf {{target.tar.gz}} --directory={{path/to/directory}} .`
|
||||||
|
|
||||||
- Extract a (compressed) archive into the current directory:
|
- E[x]tract a (compressed) archive [f]ile into the current directory:
|
||||||
|
|
||||||
`tar xf {{source.tar[.gz|.bz2|.xz]}}`
|
`tar xf {{source.tar[.gz|.bz2|.xz]}}`
|
||||||
|
|
||||||
- Extract a (compressed) archive into the target directory:
|
- E[x]tract a (compressed) archive [f]ile into the target directory:
|
||||||
|
|
||||||
`tar xf {{source.tar[.gz|.bz2|.xz]}} -C {{directory}}`
|
`tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}`
|
||||||
|
|
||||||
- Create a compressed archive, using archive suffix to determine the compression program:
|
- [c]reate a compressed archive from [f]iles, using [a]rchive suffix to determine the compression program:
|
||||||
|
|
||||||
`tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}`
|
`tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}`
|
||||||
|
|
||||||
- List the contents of a tar file:
|
- Lis[t] the contents of a tar [f]ile [v]erbosely:
|
||||||
|
|
||||||
`tar tvf {{source.tar}}`
|
`tar tvf {{source.tar}}`
|
||||||
|
|
||||||
- Extract files matching a pattern:
|
- E[x]tract [f]iles matching a pattern:
|
||||||
|
|
||||||
`tar xf {{source.tar}} --wildcards "{{*.html}}"`
|
`tar xf {{source.tar}} --wildcards "{{*.html}}"`
|
||||||
|
|
Loading…
Reference in New Issue