Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts

    How to unzip .tar.gz on server

    A friend zipped up my old site into a .tar.gz file which I moved to a new host. How do I unzip it so I can run it again?
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    So how big is this file? If it's not too big I would just download it to my own machine, untar.gz it there and upload it by FTP.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts
    super huge one is 109mb, however I found a way to unzip quick and easy.

    PHP Code:
    $path '/path/to/file.tar.gz';
    system("gunzip -c $path | tar xf -"); 
    Just create php file and place in directory you want to extract to, then set path to file.tar.gz (mine was file.tar.tar and still worked)
    But I have a different problem now, I extracted the original home directory copy and now I cannot remove dirs that are actually links...note all these are extracted to a sub dir not my current (host) home dir. The attributes for these file is lrwxrwxrwx. examples: www, subdirs within mail dir. etc.
    So how do I remove them, since my ftp client can't?
    Last edited by c1lonewolf; 07-07-2013 at 07:55 PM.
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    Quote Originally Posted by c1lonewolf View Post
    super huge one is 109mb, however I found a way to unzip quick and easy.

    PHP Code:
    $path '/path/to/file.tar.gz';
    system("gunzip -c $path | tar xf -"); 
    Just create php file and place in directory you want to extract to, then set path to file.tar.gz (mine was file.tar.tar and still worked)
    But I have a different problem now, I extracted the original home directory copy and now I cannot remove dirs that are actually links...note all these are extracted to a sub dir not my current (host) home dir. The attributes for these file is lrwxrwxrwx. examples: www, subdirs within mail dir. etc.
    So how do I remove them, since my ftp client can't?
    That's very good, but 109mb isn't big at all. My font collection is 250mb alone, and I uploaded it in about an hour with FTP. The advantage of doing it the way I said was that you would have complete control over every step, including making upgrades needed.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    Quote Originally Posted by DrDOS View Post
    That's very good, but 109mb isn't big at all.
    Thats all relative though really isn't it. To YOU isn't not that big but to me it is.

    Quote Originally Posted by DrDOS View Post
    My font collection is 250mb alone, and I uploaded it in about an hour with FTP.
    To me thats not good. For some people this might not be an issue - especially if they have a reliable connection but you can't assume everyone does. Some people might be stuck with a 1mb connection speed and a router that flakes out when it handles too much data and over heats. I've been there many times DrDos so you shouldn't assume that internet access is faultless. Not only that but FTP resume isn't exactly perfect either.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #6
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    Quote Originally Posted by tangoforce View Post
    Thats all relative though really isn't it. To YOU isn't not that big but to me it is.

    To me thats not good. For some people this might not be an issue - especially if they have a reliable connection but you can't assume everyone does. Some people might be stuck with a 1mb connection speed and a router that flakes out when it handles too much data and over heats. I've been there many times DrDos so you shouldn't assume that internet access is faultless. Not only that but FTP resume isn't exactly perfect either.
    I guess I'm just lucky, I have a reliable host, a good FTP client, a good connection, not near 1mb, my upload speed is only about 70kbs, but plenty good for what I'm doing. I don't think I'd have a problem with 250mb. You can always do uploads in multiple chunks if need be.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #7
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    Quote Originally Posted by DrDOS View Post
    I don't think I'd have a problem with 250mb. You can always do uploads in multiple chunks if need be.
    Hang on in your last post you said it took about an hour and now you're talking about it theoretically?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #8
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    Quote Originally Posted by tangoforce View Post
    Hang on in your last post you said it took about an hour and now you're talking about it theoretically?
    No, I actually did it in one chunk, it took only about an hour. What's more, I wrote a bash script that generated all the images and php pages, and that took only about a half hour. You can see the result on my very incomplete site @ Browse fonts and choose a font library. You can go there without uploading an image. I don't think I'd have a problem doing what he wants to do with a 250mb file.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #9
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    The command to extract a tar.gz archive is

    Code:
    tar xvzf file-1.0.tar.gz

  • #10
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts
    @DrDOS: Thanks but unfortunately I tried to download it a few times only to get a 'possibly corrupt' error. Namely because I still only have dialup in my area. We don't get dsl or high speed here so a file that large took hours and connections were broken etc. So I had my business partner download from original host and upload to new one for me.

    @silver_moon: Thanks for the tip, shorter codes always work wonders if they work.

    @tangoforce: thanks for stickin up for us lil' guys...

    But, I still need to know how to remove links that look like directories. Like the www and mail dirs/links
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #11
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    Quote Originally Posted by c1lonewolf View Post
    But, I still need to know how to remove links that look like directories. Like the www and mail dirs/links
    If the system has locked them up and you can't delete them via ftp or your control panel the only way to do it is to contact your host and have them do it.

    I'm afraid it's one of the perils of linux hosting (though windows hosting is just as quirky).
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #12
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    Quote Originally Posted by c1lonewolf View Post
    @DrDOS: Thanks but unfortunately I tried to download it a few times only to get a 'possibly corrupt' error. Namely because I still only have dialup in my area. We don't get dsl or high speed here so a file that large took hours and connections were broken etc. So I had my business partner download from original host and upload to new one for me.
    I didn't realize your situation was that tough. In that case, one thing you need is a decent download client, aka 'accelerator', when I was on Windows and dialup I used Flashget, on Linux I use the Flashgot addon to Firefox, an obvious imitation. Absolutely dependable was Flashget, could redial if needed, had complete resume,.would check the file for bad packets and replace them. Something else you can use is a torrent client, has to be on both machines, doesn't need a special server, they only have to know each others IPs. And they also make sure the file is complete and have perfect resume.

    And you still need a good FTP client, not so much for uploading and downloading but for cutting and pasting files from one directory to another, for making directories and changing permissions, and just general housekeeping.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #13
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    Quote Originally Posted by c1lonewolf View Post
    I still only have dialup in my area. We don't get dsl or high speed here so a file that large took hours and connections were broken etc.
    Quote Originally Posted by DrDOS View Post
    I didn't realize your situation was that tough.
    I did try to warn you

    Quote Originally Posted by DrDOS View Post
    In that case, one thing you need is a decent download client, aka 'accelerator', when I was on Windows and dialup I used Flashget
    +1 from me. I still use it now too - it's great for debugging php driven download streams and checking the byte counts etc.

    We've drifted though Dos as this wasn't really the ops original question yet somehow we've ended up talking about FTP, download managers, internet connections etc
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #14
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts
    my ftp client is 'ftp commander'. Do they still make accelerators for us po dialup users?

    @tangoforce:
    As for the links my cpanel filemanager removed them so there must be a code somewhere that I can use in the file manager I'm building that should work too, right?
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #15
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    Quote Originally Posted by c1lonewolf View Post
    Do they still make accelerators for us po dialup users?

    @tangoforce:
    As for the links my cpanel filemanager removed them so there must be a code somewhere that I can use in the file manager I'm building that should work too, right?
    Yes 'they' still make download 'managers'. Accelerator isn't really a great way to describe them really. It goes back to the dialup days where before DSL was widespread. People called their download managers aceclerators because it got them more attention. Ultimately what these programs really did was run seperate threads to grab different bits of the file rather than one thread. The result was that each thread had less bandwidth than one single thread but it convinced you the user that it was faster.

    Flashget (and many others) are still actively developed and maintained. I personally use flashget, it's the best I've ever found. Hit google and you'll have it in no time.

    As for the cpanel code.. cpanel is pretty much rooted into the linux servers it's installed on. It isn't a set of normal php files that you just run on a webserver, cpanel has all sorts of other processes running live too. It's far more complex than you would realise.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •