Master Essential Linux Commands: ar, bunzip2, gzip, tar and More
This guide provides concise descriptions, syntax, key parameters, and usage examples for a range of essential Linux commands—including ar, bunzip2, bzip2, gunzip, tar, zip, and others—helping users efficiently manage archives, compression, and system backups.
Linux ar command
The ar command creates or modifies archive files, or extracts files from an archive. It can combine many files into a single archive while preserving original attributes and permissions.
Syntax
ar [-dmpqrtx] [cfosSuvV] [a<member_file>] [b<member_file>] [i<member_file>] [archive_file] [member_files]Linux bunzip2 command
The bunzip2 command decompresses .bz2 files. It is a symbolic link to bzip2 -d and shares the same options.
Syntax
bunzip2 [-fkLsvV] [.bz2_file]Parameters
-for --force: overwrite existing files. -k or --keep: keep the original compressed file. -s or --small: reduce memory usage. -v or --verbose: show detailed processing information. -l, --license, -V or --version: display version information.
Example
# bunzip2 -v temp.bz2 // decompress with verbose outputLinux bzip2 command
The bzip2 command compresses files using a block‑sorting algorithm that typically yields better compression ratios than traditional LZ77/LZ78 methods. By default it creates a .bz2 file and removes the original.
Syntax
bzip2 [-cdfhkLstvVz] [compression_level] [files...]Linux bzip2recover command
The bzip2recover command attempts to recover data from a damaged .bz2 archive by extracting undamaged blocks, useful for large compressed files.
Syntax
bzip2recover [bz2_file]Linux gunzip command
The gunzip command decompresses files that were compressed with gzip. It is a hard link to gzip, so both compression and decompression can be performed with gzip options.
Syntax
gunzip [-acfhlLnNqrtvV] [-s suffix] [files...]Linux unarj command
The unarj command extracts files from .arj archives.
Syntax
unarj [eltx] [arj_file]Linux compress command
The compress command is an older Unix utility that creates .Z compressed files; modern systems usually prefer gzip.
Syntax
compress [-dfvcV] [-b maxbits] [file ...]Linux cpio command
The cpio command copies files to and from archive files, often used for backups.
Syntax
cpio [-0aABckLovV] [-C size] [-F backup_file] [-H format] [-O output_file] [options] [files...]Linux dump command
The dump command backs up file systems to a specified device or file.
Syntax
dump [-cnu] [-b blocksize] [-B blockcount] [-d density] [-f device] [-h level] [-s length] [-T date] [directory|filesystem]Linux uuencode command
The uuencode command converts binary files to a 7‑bit ASCII representation for transmission over protocols that only support text.
Syntax
uuencode [options] [file ...] <output_file>Linux gzexe command
The gzexe command compresses executable files; when run, the file automatically decompresses and executes.
Syntax
gzexe [-d] executable_file...Linux gzip command
The gzip command compresses files, appending a .gz extension.
Syntax
gzip [-acdfhlLnNqrtvV] [-S suffix] [files...]Linux lha command
The lha command compresses or decompresses files, producing .lzh archives.
Syntax
lha [-acdfglmnpqtuvx] [options] [files...]Linux restore command
The restore command restores files or entire file systems from backups created with dump.
Syntax
restore [-cCvy] [-b blocksize] [-D filesystem] [-f backup_file] [-s file_number] [files...]Linux tar command
The tar command creates and extracts archive files, commonly used for backups.
Syntax
tar [-ABcdgGhiklmMoOpPrRsStuUvwWxzZ] [-b blockcount] [-C directory] [-f archive_file] [options] [files...]Linux uudecode command
The uudecode command reverses uuencode, restoring the original binary file from the encoded text.
Syntax
uudecode [options] [file ...]Linux unzip command
The unzip command extracts files from .zip archives.
Syntax
unzip [-cflptuvz] [-agCjLMnoqsVX] [-P password] zipfile [files...] [-d directory] [-x pattern]Linux zip command
The zip command compresses files into a .zip archive.
Syntax
zip [-AcdfghjJKlLmoqrSTuvVwXyz$] [-b work_dir] [-ll] [-n suffix] [-t datetime] [files...]Linux zipinfo command
The zipinfo command lists detailed information about .zip archives.
Syntax
zipinfo [-12hlmMstTvz] zipfile [files...] [-x pattern]Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
