Linux: How to Zip and Unzip Files Using the Terminal
HardReset.InfoDecember 16, 20257 min59 views
4 connectionsΒ·6 entities in this videoβChecking and Installing Zip/Unzip Tools
- π‘ Terminal access is the first step for managing archives on Linux.
- π Verify if
zipandunzipare installed by typingzip --versionandunzip --version. - π οΈ If tools are missing on Ubuntu/Debian, install them using
sudo apt install zip unzip.
Creating Zip Archives
- π¦ To zip individual files, use the command
zip archive-name file1 file2. - π― For example,
zip files.zip file.txt file2.txtcreates an archive namedfiles.zipcontaining both text files. - π View the contents of a zip archive without extracting by using
unzip -l archive.zip.
Extracting Zip Archives
- π To unzip files, use the command
unzip archive.zip. - β οΈ Be aware of potential name conflicts if files with the same names already exist in the destination directory; you can choose to replace or skip them.
Zipping and Unzipping Folders
- π To zip a folder and its contents recursively, use the
-roption:zip -r archive-name folder-name. - π Example:
zip -r folder_with_files.zip folderwill create an archive containing the specified folder and all its files and subdirectories. - π To unzip a folder archive, use the standard
unzip archive.zipcommand, which will recreate the folder structure. - ποΈ Folders can be removed using
rm -r folder-name.
Knowledge graph6 entities Β· 4 connections
How they connect
An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.
Hover Β· drag to explore
6 entities
Chapters3 moments
Key Moments
Transcript26 segments
Full Transcript
Topics10 themes
Whatβs Discussed
LinuxZip FilesUnzip FilesTerminal CommandsUbuntuDebianArchive ManagementFile CompressionRecursive ZippingName Conflicts
Smart Objects6 Β· 4 links
ProductsΒ· 4
ConceptsΒ· 2