mirror of https://github.com/CrimsonTome/tldr.git
zip: add list files example and update first example (#5667)
From the `zip` man page: > The -sf show files option can be used to scan for files and get the list of files scanned without actually processing them.manned-org
parent
fc2f118103
commit
3597c70e6c
|
@ -2,9 +2,9 @@
|
|||
|
||||
> Package and compress (archive) files into zip file.
|
||||
|
||||
- Package and compress a directory and its contents, [r]ecursively:
|
||||
- Package and compress files and directories [r]ecursively:
|
||||
|
||||
`zip -r {{compressed.zip}} {{path/to/directory}}`
|
||||
`zip -r {{compressed.zip}} {{path/to/file}} {{path/to/directory1}} {{path/to/directory2}}`
|
||||
|
||||
- E[x]clude unwanted files from being added to the compressed archive:
|
||||
|
||||
|
@ -14,10 +14,6 @@
|
|||
|
||||
`zip -r -{{9}} {{compressed.zip}} {{path/to/directory}}`
|
||||
|
||||
- Package and compress multiple directories and files:
|
||||
|
||||
`zip -r {{compressed.zip}} {{path/to/directory1}} {{path/to/directory2}} {{path/to/file}}`
|
||||
|
||||
- Create an encrypted archive (user will be prompted for a password):
|
||||
|
||||
`zip -e -r {{compressed.zip}} {{path/to/directory}}`
|
||||
|
@ -33,3 +29,7 @@
|
|||
- Archive a directory and its contents to a multi-part [s]plit zip file (e.g. 3GB parts):
|
||||
|
||||
`zip -r -s {{3g}} {{compressed.zip}} {{path/to/directory}}`
|
||||
|
||||
- List files within a specified archive (without extracting them):
|
||||
|
||||
`zip -sf {{compressed.zip}}`
|
||||
|
|
Loading…
Reference in New Issue