Skip to content

Latest commit

 

History

History
33 lines (32 loc) · 913 Bytes

File metadata and controls

33 lines (32 loc) · 913 Bytes

Compress files and directories

zip archive_name.zip file1 file2 # Compress multiple files into a zip archive
zip -r archive_name.zip directory # Compress a directory and its contents into a zip archive
zip -u archive_name.zip file1 # Update a zip archive with new files
zip -d archive_name.zip file1 # Remove a file from a zip archive
tar -czvf archive_name.tar.gz directory # Compress a directory into a tar.gz archive
tar -xzvf archive_name.tar.gz # Extract a tar.gz archive

Extract files from a zip archive

unzip archive_name.zip # Extract all files from a zip archive
unzip archive_name.zip -d destination_directory # Extract files to a specific directory
unzip -l archive_name.zip # List the contents of a zip archive
unzip -t archive_name.zip # Test the integrity of a zip archive