
Linux Fundamentals - Part 14: Archiving & Compressing Files
Archiving Archiving means combining multiple files into one single file. It does not reduce file size, it simply packages everything together. tar - command use to create the archive. I practiced creating an archive using: tar -cvf archive.tar proj_dir What -cvf means: c - tells tar to create a new archive. v - verbose (show progress). f - file name. This creates one file called archive.tar that contains everything inside proj_dir . Compression Compression reduces files size to save storage space and make file transfers faster. gzip - command use to compress file size. Example: gzip archive.tar This command will compress archive.tar and rename it to archive.tar.gz. The original archive.tar file will be replaced by the compressed version. This created: archive.tar.gz Archiving + Compressing Together What I found really useful is that we can archive and compress at the same time: tar -czvf archive.tar.gz sample_dir The new option here is: z - use gzip compression This command: Combines t
Continue reading on Dev.to Beginners
Opens in a new tab



