You are not logged in.

#1 2009-11-30 00:09:06

exparrot
Member
From: The United States of Awesome
Registered: 2009-11-30
Posts: 4

I am afraid of asking newbie questions but how do you unzip files?

I've been using Archlinux for a couple of months now, but have no idea whatsoever of how to unzip files! How does the unzipping process work in Archlinux? FYI, the files I want to unzip are some font files. I would really appreciate the help! Thanks!

Offline

#2 2009-11-30 00:10:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

This will do it:

http://www.archlinux.org/packages/extra/i686/unzip/

$man unzip

(See, that wasn't so bad... Welcome to the forums!)

Last edited by jasonwryan (2009-11-30 00:11:59)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2009-11-30 00:21:20

exparrot
Member
From: The United States of Awesome
Registered: 2009-11-30
Posts: 4

Re: I am afraid of asking newbie questions but how do you unzip files?

jasonwryan wrote:

This will do it:

http://www.archlinux.org/packages/extra/i686/unzip/

$man unzip

(See, that wasn't so bad... Welcome to the forums!)

LOL... no it wasn't. Okay, so I've got it. I'm sorry if I'm asking alot of funny questions, I've been dependent on my sister for everything Archlinux as she's the one who put it on my laptop, BUT once I've got this unzip app, what command do I use in the terminal? The font files are in the Downloads folder. Also, do I have to move the fonts to the a fonts directory (I'm assuming there must be one)?

Offline

#4 2009-11-30 00:32:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

man unzip

Running man (short for manual) in a terminal will explain how to use the programme. In this case, you would enter

unzip filename

although you may want to specify an option(s). Read the man page and play around with it. If you run into trouble, you can always ask.

There is a good page on the wiki explaining how to install new fonts: http://wiki.archlinux.org/index.php/Fonts

Last edited by jasonwryan (2009-11-30 00:32:53)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2009-11-30 00:33:07

exparrot
Member
From: The United States of Awesome
Registered: 2009-11-30
Posts: 4

Re: I am afraid of asking newbie questions but how do you unzip files?

That worked! Thank you so much for your help!

Offline

#6 2009-11-30 00:34:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

No problem.

Once an issue is sorted, could you edit the post title and include a [SOLVED] at the front?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2009-11-30 02:21:05

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: I am afraid of asking newbie questions but how do you unzip files?

FYI you can avoid installing an extra app by using bsdtar from base/libarchive.  It's a dependency of pacman, so you will already have it.

Offline

#8 2009-11-30 03:02:06

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: I am afraid of asking newbie questions but how do you unzip files?

exparrot wrote:

I've been using Archlinux for a couple of months now, but have no idea whatsoever of how to unzip files! How does the unzipping process work in Archlinux? FYI, the files I want to unzip are some font files. I would really appreciate the help! Thanks!

Since no one linked you to it, here is the Arch wiki page that explains how to unzip any file with the terminal: http://wiki.archlinux.org/index.php/Pos … ssed_Files

.... and jasonwryan's answer was what you needed to do, you will also need to follow this guide for unpacking .rar files: http://wiki.archlinux.org/index.php/RAR#UNRAR

Last edited by methuselah (2009-11-30 03:08:41)

Offline

#9 2009-11-30 03:08:41

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: I am afraid of asking newbie questions but how do you unzip files?

"bsdtar" provided by libarchive also unzips files. p7zip handles them as well. There's many options. You can also run pacman -Ss keyword to search for packages.

Have you read the beginner's guide and post install tips?

Offline

#10 2009-11-30 03:14:23

3nd3r
Member
From: /dev/null
Registered: 2002-12-08
Posts: 301
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

here is a nice ittle code to add to your .bashrc

extract () {
        if [ -f $1 ] ; then
                case $1 in
                        *.tar.bz2)        tar xjf $1                ;;
                        *.tar.gz)        tar xzf $1                ;;
                        *.bz2)                bunzip2 $1                ;;
                        *.rar)                rar x $1                ;;
                        *.gz)                gunzip $1                ;;
                        *.tar)                tar xf $1                ;;
                        *.tbz2)                tar xjf $1                ;;
                        *.tgz)                tar xzf $1                ;;
                        *.zip)                unzip $1                ;;
                        *.Z)                uncompress $1        ;;
                        *)                        echo "'$1' cannot be extracted via extract()" ;;
                esac
        else
                echo "'$1' is not a valid file"
        fi
}

add that, then type bash to reload, then you can just type extract followed by the file name

example

extract porn.zip

Offline

#11 2009-11-30 04:26:28

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

And for GUI approach, I find KDE's Ark program is pretty handy - the WinZip of linux

pacman -S kdeutils-ark zip unzip unrar

Offline

#12 2009-11-30 04:34:55

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: I am afraid of asking newbie questions but how do you unzip files?

IgnorantGuru wrote:

And for GUI approach, I find KDE's Ark program is pretty handy - the WinZip of linux

pacman -S kdeutils-ark zip unzip unrar

If you have a gtk-oriented system, I'd recommend xarchiver.

Offline

#13 2009-11-30 10:39:14

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: I am afraid of asking newbie questions but how do you unzip files?

I have a slightly different extract function. It needs only 7zip and libarchive, and it uses file instead of going by the extension.

http://github.com/Daenyth/dotfiles/blob … ashrc#L131

Offline

#14 2009-11-30 15:45:49

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: I am afraid of asking newbie questions but how do you unzip files?

theapodan wrote:
IgnorantGuru wrote:

And for GUI approach, I find KDE's Ark program is pretty handy - the WinZip of linux

pacman -S kdeutils-ark zip unzip unrar

If you have a gtk-oriented system, I'd recommend xarchiver.

Or File Roller [file-roller].

Last edited by Wintervenom (2009-11-30 15:46:17)

Offline

#15 2009-11-30 15:46:57

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: I am afraid of asking newbie questions but how do you unzip files?

Daenyth wrote:

I have a slightly different extract function. It needs only 7zip and libarchive, and it uses file instead of going by the extension.

http://github.com/Daenyth/dotfiles/blob … ashrc#L131

That's pretty sweet. Nice and clean.

Offline

#16 2009-11-30 22:56:56

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

Here's mine (zsh):

xt ()
{
    if [[ -f $1 ]]; then
        while [[ -f $1 ]]; do
            case $1 in
                (*.tar.bz2 | *.tbz2) tar xvjf $1          ;;
                (*.tar.gz | *.tgz) tar xvzf $1            ;;
                (*.tar.7z) 7z x -so $1 | tar xf -         ;;
                (*.tar) tar xvf $1                        ;;
                (*.bz2) bunzip2 $1                        ;;
                (*.gz) gunzip $1                          ;;
                (*.Z) uncompress $1                       ;;
                (*.zip) 7z x $1                           ;;
                (*.rar) unrar x $1                        ;;
                (*.7z) 7z x $1                            ;;
                (*) echo "$0: $1: Error. Please go away." ;;
            esac
            shift
        done
    else
        echo "$0: Provide at least one input file, punk."
    fi
}

It goes by extension for the advantage of automatically handling .tbz2, .tgz and .tar.7z.

Offline

#17 2009-11-30 23:22:04

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: I am afraid of asking newbie questions but how do you unzip files?

Wow, this thread has been massively hijacked. In a good way, though.

Offline

#18 2009-11-30 23:31:04

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: I am afraid of asking newbie questions but how do you unzip files?

JohannesSM64 wrote:

It goes by extension for the advantage of automatically handling .tbz2, .tgz and .tar.7z.

Going by extension doesn't "automatically" handle anything.  You have to manually list and check all extensions.  Even though most people use traditional ".tar.gz" and ".tgz" extension names, those extensions are not required and do not dictate the file type.

Letting `file` determine the file type is a truly "automatic" solution.  That is what makepkg uses to extract sources.

Offline

#19 2009-12-01 01:38:11

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

theapodan wrote:

If you have a gtk-oriented system, I'd recommend xarchiver.

Thanks I'll check that out.  I was hoping someone would recommend an alternative as I'm trying to drop as many heavy KDE apps as I can.

Offline

#20 2009-12-01 06:43:05

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

tdy wrote:

Going by extension doesn't "automatically" handle anything.  You have to manually list and check all extensions.  Even though most people use traditional ".tar.gz" and ".tgz" extension names, those extensions are not required and do not dictate the file type.

Letting `file` determine the file type is a truly "automatic" solution.  That is what makepkg uses to extract sources.

You didn't quite get it.
file shows gzip compressed tars as being "gzip data". Thus, if you go by file output, you would use gunzip for that. This will only extract the tar file - then you need to extract the contents of the tar too. Going by extension automates this. since people commonly use .tar.gz or .tgz, it can be detected from the extension, automatically using tar xvzf instead of gunzip. I've yet to have a problem with it.

Offline

#21 2009-12-02 00:44:41

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: I am afraid of asking newbie questions but how do you unzip files?

JohannesSM64 wrote:

You didn't quite get it.
file shows gzip compressed tars as being "gzip data". Thus, if you go by file output, you would use gunzip for that. This will only extract the tar file - then you need to extract the contents of the tar too.

Before you jump to the conclusion that I'm the one who doesn't get it, you might want to have a look at `man file` (hint: -z option..) and some clear-cut examples like makepkg's extract_sources() or Daenyth's ex() functions.

JohannesSM64 wrote:

I've yet to have a problem with it.

and you might not ever have one.  I even said in my last post that most people just use traditional extensions.. but there is still nothing automatic about explicitly testing extensions.

If you need an example to realize that your function is not automatic, here it is.  I just ran into these files a few days ago when I was looking for a mirror to fix the source on one of my package:
http://www.filewatcher.com/b/ftp/ftp.ga … l.0.0.html
Your xt() wouldn't be able to handle any of those files because you didn't include ".tbz" as an extension for bzip2 tarballs.  File would take care of this properly.

Take the advice if you want to, or don't take it if you don't want to.. like I said, you might not ever run across .tbz files yourself.  I was simply explaining a better, automatic solution.

Last edited by tdy (2009-12-02 16:45:02)

Offline

#22 2009-12-02 11:26:29

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: I am afraid of asking newbie questions but how do you unzip files?

File beats extensions any time.

Extensions are a) for humans and b) for Windows. Nuff said.

For the record: this is no flame about Windows whatsoever. Just about the usefulness/uselessness of extensions.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#23 2009-12-02 19:03:53

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: I am afraid of asking newbie questions but how do you unzip files?

JohannesSM64 wrote:

file shows gzip compressed tars as being "gzip data"

Please "man file"

Offline

Board footer

Powered by FluxBB