TAR is *very* slow on recovering a file

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
mike acker
Level 7
Level 7
Posts: 1517
Joined: Wed Jul 31, 2013 6:29 pm
Location: Kalamazoo, MI

TAR is *very* slow on recovering a file

Post by mike acker »

this morning i wanted to recover img159.jpg from a .tar -- that held my entire /Pictures directory

it took an hour -- as -- 1st -- archive manage has to read the entire .tar just to get the files directory, and 2d-- archive manager has to read the whole archive again -- in order to get the 1 little file i wanted

there has to be a better way

zip might work but it's such a PITA to figure out what their option switches mean

it appears something like this will be right

Code: Select all

zip --recurse-paths ~/Backups/test_zip *
evidently the command must be issued from the directory containing the files to be archived recursing the paths not being allowed except in the current directory :(

this might not be too bad as a backup script could be positioned at the top of each major directory

there must be a better tool around,-- someplace!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
¡Viva la Resistencia!
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: TAR is *very* slow on recovering a file

Post by Flemur »

there has to be a better way
Don't use tar; just copy the files to the backup location.

Tar doesn't natively compress, and if you compress the tar file (with zip, gzip, etc), the jpg files won't get smaller because they're already compressed.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
shengchieh

Re: TAR is *very* slow on recovering a file

Post by shengchieh »

There is a way to extract one file from a tarball. I never done it, but see

http://www.cyberciti.biz/faq/linux-unix ... fic-files/

If you still stuck, do a search for tar uncompress one file

Sheng-Chieh
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: TAR is *very* slow on recovering a file

Post by phd21 »

HI mike acker,

Personally, I use the file manager and ARK and it seems pretty quick to me even on my older, very limited, computer hardware. Granted, I do not have super large archive files. I can right click, open with Ark, pick a file or files, and extract those pretty easily. I can even right click an archive file and open in new tab, locate a file and open in an app, like it was not even in an archive, and it will automatically extract it to that app ("archivemount" does this too).

There are numerous file manager "archive" programs (plug-ins) in the Software Manager or Synaptic Package Manager (SPM) for whatever file manager you use. FileRoller, pixz (multi threaded with indexing), etc...

As was already mentioned, there is no benefit to archiving compressed files, especially a lot of them. How big an archive file do you have and how many files are in it?

Tar Extract a Single File(s) From a Large Tarball
http://www.cyberciti.biz/faq/linux-unix ... fic-files/

How to extract specific file(s) from tar.gz
http://unix.stackexchange.com/questions ... rom-tar-gz

FYI: File Compression and Archiving
https://access.redhat.com/documentation ... iving.html


Hope this helps ...
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
Locked

Return to “Chat about Linux”