1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/rar.md

29 lines
875 B
Markdown
Raw Normal View History

2019-10-17 16:03:11 +03:30
# rar
> The RAR archiver. Supports multi-volume archives that can be optionally self-extracting.
> More information: <https://manned.org/rar>.
2019-10-17 16:03:11 +03:30
- Archive 1 or more files:
`rar a {{path/to/archive_name.rar}} {{path/to/file1}} {{path/to/file2}} {{path/to/file3}}`
- Archive a directory:
`rar a {{path/to/archive_name.rar}} {{path/to/directory}}`
- Split the archive into parts of equal size (50M):
2019-10-18 14:38:14 +03:30
`rar a -v{{50M}} -R {{path/to/archive_name.rar}} {{path/to/file_or_directory}}`
2019-10-17 16:03:11 +03:30
- Password protect the resulting archive:
`rar a -p{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}`
- Encrypt file data and headers with password:
`rar a -hp{{password}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}`
- Use a specific compression level (0-5):
`rar a -m{{compression_level}} {{path/to/archive_name.rar}} {{path/to/file_or_directory}}`