Extract Compressed Files


Sorry for the newbie post, but I’m use to CPanel.

How can I extract .gz, .tar, .zip, and .tar.gz files on my DreamHost server? I don’t understand how to do it from an ftp client application command line or through the web-based tools that come with the hosting account.



The commands you need are gunzip, tar and unzip. You use them from a ssh connection.

Some examples:

gunzip some.file.gz
tar xvf some.file.tar
tar xvzf some.file.tar.gz
unzip some.file.zip

For more information on the commands, you can type:

man gunzip
man tar
man unzip

or search about on Google.

I hope this helps!


hcarty pointed you in the right direction in explaining which shell commands to use to extract your compressed files. However, if you are used to cpanel, you will need to learn how to connect to and become acquainted with the *nix shell. You use an ssh client to do this, as opposed to using ftp or “Panel based” tools.

This Dreamhost Wiki page intoducing the shell is a good place to start. Pay special attention to the links at the bottom of the article for additional information about connecting to the shell via ssh (instead of an ftp client), common commands to use when connected to the shell, and making sure your account has shell access enabled.

While these things may seem daunting at first, you will find the time you spend in learning how to operate in the shell is well worth the investment, as using shell tools on occasion can make you life managing webspace much easier in many ways. Once you have had a taste of the kind of flexibility and power the shell affords, you will most likely not want to be limited to cpanel again :wink: Good luck!



Thanks for your info RP, made research on this a little easier.


Was looking to unzip files here and was surpirsed at the complexity for a beginner like me. So I Googled and came accross Putty(.org) software.
A beginner like me had it understood and done within 5 minutes, so I can recommened Putty to other beginners like me.
Just 3 commands to remember:

ls (list)
cd (domain.com) (go to domain/folder)
(can also do: cd domain.com/xxxx/xxx/xxxx/xxx)
unzip (filename)

Works great, just upload the zip-file where you need the files and done.

On an other note, many times I look thru the forum, but most things are just to technical discribed for any beginner to understand and since this is a beginners forum, be patient with us.
A big thanks to all regular helpers.

Regards, Ron


Upload the zip file. Create a php file with the command to unzip the file.