mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-31 01:57:54 +00:00
1.4 KiB
1.4 KiB
Archive files
Archive files are good for saving some space and reducing the files needed for transfer. Nowadays, there are a lot of archive formats. Having worked with multiple of them, it can be confusing.
I'll just track them with this file.
Take note that not all files are stored with the file extension.
If it lacks the extension, inspect the file with the magic number.
You can do that with any file inspection tools like file.1
.
Format | File extension | Command to extract |
---|---|---|
Gunzip | .gz , .gzip |
tar -zxf $FILE , gunzip -c $FILE |
ZIP | .zip |
unzip $FILE |
Zstd | .zst |
tar --zstd xf $FILE |
xz | .xz |
tar --xz xf $FILE |
ISO | .iso |
There are also some libraries and applications for certain types of files.
- libarchive is a library that supports multiple archive formats
- GNU tar is the most popular utility for extracting archives