What if you could carry all your scattered files in one simple package with a single command?
Why tar (create and extract archives) in Linux CLI? - Purpose & Use Cases
Imagine you have dozens of files and folders scattered across your computer. You want to send them all to a friend or back them up. Doing this one by one, copying and pasting each file, feels like carrying a heavy stack of papers one sheet at a time.
Manually copying files is slow and tiring. You might forget some files or mix up versions. It's easy to make mistakes, lose data, or waste time repeating the same steps over and over.
The tar command bundles all your files and folders into one neat package. It's like putting all your papers into a single folder, making it easy to move, share, or store everything at once. Extracting them later is just as simple.
cp file1.txt /backup/ cp file2.txt /backup/ cp -r folder1 /backup/folder1/
tar -cf backup.tar file1.txt file2.txt folder1/ tar -xf backup.tar
You can quickly bundle and unbundle large sets of files, saving time and avoiding errors when moving or backing up data.
When you want to send a photo album or a project folder to a friend, tar lets you pack everything into one file to email or upload easily, instead of sending dozens of separate files.
Manual copying is slow and error-prone.
tar bundles files into one archive for easy handling.
Extracting archives restores all files quickly and safely.