1

Lets say i have a big backup.tar.gz file in a remote ftp server. I needed some files from it but i dont want to download/untar all of it. Just specific files/folder. normally this is code to select files from a tar.gz file:

tar zxf backup.tar.gz /the/file/you/want

but.. from ftp server without downloading it? Is it possible?

2 Answers 2

1

This is not possible. To extract a specific file from the tar file you will fist have to extract the the tar file from the .gz file. To do this you will have to read the whole .gz file. Once you've done this you still have to read the tar file sequentially to find the start of the file you want to extract.

1
  • In addition, tar continues reading through the entire file even once it has found the files you want to extract.
    – Ladadadada
    Mar 8, 2012 at 18:14
0

It might be possible using CurlFtpFS. You would have to verify that it does not download the entire tar file when you operate on it.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.