Linux Tar and Archives
Pack, compress, and extract tarballs without surprises.
- linux tar
- extract tarball
- gzip
- zip unzip
- strip-components
Linux Tar and Archives
Pack, compress, and extract tarballs without surprises.
Commands
| Command | What it does |
|---|---|
tar -czf archive dir | Create gzipped archive |
tar -tzf archive, list first | List contents safely first |
tar -xzf to dir | Extract to a directory |
strip top-level folder | Drop the wrapper folder on extract |
zip create and list | Zip interchange commands |
Example
tar -czf backup.tar.gz app/
tar -tzf backup.tar.gz | head
FAQ
When is strip-components useful?
Release tarballs wrap code in a version folder; stripping extracts contents directly.
tar.gz vs zip?
tar.gz preserves unix permissions and streams well; zip suits Windows interchange.
คำถามที่พบบ่อย
When is strip-components useful?
Release tarballs wrap code in a version folder; stripping extracts contents directly.
tar.gz vs zip?
tar.gz preserves unix permissions and streams well; zip suits Windows interchange.
Linux
Linux Files and Directories
Navigate, create, move, and inspect files with core commands.
Linux Permissions
Read ls output, chmod, chown, and sudo without breaking access.
Linux Text Processing
cat, head, cut, sort, uniq, and awk for daily data shaping.
Linux grep and find
Find files by name, age, and size; search inside them fast.