mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 08:02:08 +02:00
shar: add page (#10643)
* shar: add page --------- Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
eb5e1e4a40
commit
17d76276d9
2 changed files with 32 additions and 0 deletions
8
pages/common/shar.md
Normal file
8
pages/common/shar.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# shar
|
||||||
|
|
||||||
|
> Create a shell archive.
|
||||||
|
> More information: <https://manned.org/man/freebsd/shar>.
|
||||||
|
|
||||||
|
- Create a shell script that when executed extracts the given files from itself:
|
||||||
|
|
||||||
|
`shar {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
24
pages/linux/shar.md
Normal file
24
pages/linux/shar.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# shar
|
||||||
|
|
||||||
|
> Create a shell archive.
|
||||||
|
> More information: <https://www.gnu.org/software/sharutils/manual/sharutils.html>.
|
||||||
|
|
||||||
|
- Create a shell script that when executed extracts the given files from itself:
|
||||||
|
|
||||||
|
`shar --vanilla-operation {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
||||||
|
|
||||||
|
- Compress the files in the archive:
|
||||||
|
|
||||||
|
`shar --compactor {{xz}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
||||||
|
|
||||||
|
- Treat all files as binary (i.e. `uuencode` everything):
|
||||||
|
|
||||||
|
`shar --uuencode {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
||||||
|
|
||||||
|
- Treat all files as text (i.e. `uuencode` nothing):
|
||||||
|
|
||||||
|
`shar --text-files {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
||||||
|
|
||||||
|
- Include a name and cut mark in the header comment of the archive:
|
||||||
|
|
||||||
|
`shar --archive-name "{{My files}}" --cut-mark {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
Loading…
Add table
Reference in a new issue