2023-08-29 12:09:28 +02:00
|
|
|
# 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:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`shar {{[-V|--vanilla-operation]}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
2023-08-29 12:09:28 +02:00
|
|
|
|
|
|
|
- Compress the files in the archive:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`shar {{[-C|--compactor]}} {{xz}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
2023-08-29 12:09:28 +02:00
|
|
|
|
|
|
|
- Treat all files as binary (i.e. `uuencode` everything):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`shar {{[-B|--uuencode]}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
2023-08-29 12:09:28 +02:00
|
|
|
|
|
|
|
- Treat all files as text (i.e. `uuencode` nothing):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`shar {{[-T|--text-files]}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|
2023-08-29 12:09:28 +02:00
|
|
|
|
|
|
|
- Include a name and cut mark in the header comment of the archive:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`shar {{[-n|--archive-name]}} "{{My files}}" {{[-c|--cut-mark]}} {{path/to/file1 path/to/file2 ...}} > {{path/to/archive.sh}}`
|