How to easily update a tar file from the Linux file manager

2 years ago 652

Instead of re-creating your tar archives erstwhile you request to adhd files, wherefore not simply append those files? Jack Wallen shows you however from the bid enactment and a GUI record manager connected Linux.


Image: Dilok Klaisataporn/Shutterstock

If you're a Linux admin, there's a bully accidental you marque usage of tar to make backups of information oregon simply marque files from directories truthful you tin easy store oregon stock them with others. But however galore times person you created a tar file, lone to crook astir and adhd a caller record to the root directory? What bash you past do? 

SEE: 40+ unfastened root and Linux presumption you request to know (TechRepublic Premium)

You re-created the tar record successful the aforesaid mode you primitively did. That's benignant of a hassle, particularly if you hap to beryllium moving wrong a desktop environment. Why fuss re-running the aforesaid aged process for creating a caller tar file, erstwhile there's a overmuch easier mode of doing things? 

Before I amusement you this method, cognize that you tin besides execute it by mode of the bid line. Let's accidental you person TEST.tar and you privation to adhd the record mytest.txt to the tar. To bash that, you would contented the command:

tar -rf TEST.tar mytest.txt

If you past contented the command: 

tar -tf TEST.tar

you'll spot that mytest.txt is recovered wrong the archive. 

Now, however tin we bash this with a GUI? It's precise simple. You should cognize this method doesn't enactment with conscionable .tar files. 

Instead, those files request to beryllium compressed and extremity with either .gz, .xz, .zip, oregon .7z. So, if you've created your archive with a bid like:

tar -cf TEST.tar.xz TEST

you should beryllium OK. 

Or, if you've created the archive by right-clicking a directory successful the record manager and selecting Compress, this volition work. 

To adhd the record to the archive, each you person to bash is click the mytest.txt record and resistance it into the TEST.tar.xz archive. Once you've done that, click to unfastened the archive and you should spot the mytext.txt record is there. 

SEE: Linux turns 30: Celebrating the unfastened root operating strategy (free PDF) (TechRepublic)  

Using this method allows you to append files to either compressed oregon uncompressed tar archives, whereas the bid enactment enactment lone allows you to append to a non-compressed archive. This elemental task volition prevention you clip and, for once, springiness you options the bid enactment doesn't.

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Open Source Weekly Newsletter

You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered Tuesdays

Sign up today

Also spot

Read Entire Article