untar and ungzip commands

New to Debian (Or Linux in general)? Ask your questions here!

untar and ungzip commands

Postby movietime » 2019-09-13 03:39

Hi there, I got a lab from the school and it mention to use untar and ungzip commands. When I ran any of these against a .tar.gz file, both the commands are not found.
I tried to install them using apt-update but no luck.
How can I get them to work in Debian 10?
Posts: 1
Joined: 2019-09-13 03:34

Re: untar and ungzip commands

Postby Dai_trying » 2019-09-13 06:22

You could install the command-not-found package
Code: Select all
# apt install command-not-found

After installation you will need to run these two commands to update the databases
Code: Select all
# apt-file update
# update-command-not-found

And then when you try to use a command that is not installed it will tell you what to do ie-
Code: Select all
dai@home:~$ ungzip

Command 'ungzip' not found, did you mean:

  command 'unzip' from deb unzip

Try: sudo apt install <deb name>

and if the commands are installed (maybe gunzip rather than ungzip?) and you need to know how to use them you can type
Code: Select all
$ man gunzip
to get information.
Posts: 926
Joined: 2016-01-07 12:25

Re: untar and ungzip commands

Postby Head_on_a_Stick » 2019-09-29 18:12

movietime wrote:use untar and ungzip commands

Use the tar command to untar (the x option extracts the archive). And gunzip instead of ungzip, as Dai_trying notes.

This should work:
Code: Select all
tar xf file.tar.gz

Extraction is automagical these days :)
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Posts: 12175
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: untar and ungzip commands

Postby tynman » 2019-09-29 23:26

If the school really told you to use the untar and ungzip commands, it's time to find a better school. :roll:
Posts: 124
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: untar and ungzip commands

Postby sunrat » 2019-09-30 01:08

tynman wrote:If the school really told you to use the untar and ungzip commands, it's time to find a better school. :roll:

Or maybe it's a really good teacher who challenges students to do lateral thinking and find out for themselves what the actual commands are. Teaching how to learn is just as important as teaching knowledge. :wink:
If I had a dollar for every time I had to search the webz to find correct commands and syntax, I'd have a lot of dollars. :D
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
Posts: 3088
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 15 guests