command for gunzip?

Hi All

This is very basic query but I have a huge folder named backup that I need to transfer.

What is the command to convert the file in format backup.tar.gz so that I could transfer the folder.

Is the command gzip filename?

Thanks
Sonia.
:wall:

Here it is

tar -cvzf filename.gz filename
tar -cvf backup.tar backup
gzip backup.tar

Now you will have backup.tar.gz

Sorry for the confusion.
What I meant to say was I had a directory named backup and I wanted that directory in format as
backup.tar.gz

I used gunzip directly but it gave me an error

gzip: backup is a directory -- ignored

So I wanted a command for directory.
Hope my query is clear.:o

Thanks

Sorry, I misread your question. Good answers have been offered already.

You can use tar command with the directory name..

Thanks bipinajith for the spot on answer!!
Thanks Adhi and Scott for insight!! :slight_smile:
:slight_smile: :smiley: