View previous topic :: View next topic |
Author |
Message |
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
Posted: Tue Nov 07, 2025 5:18 am Post subject: Extracting Compressed Files |
|
|
Extracting compressed files
Code: |
file.tar : tar xvf file.tar
file.tgz : tar xvzf file.tgz
file.tar.gz : tar xvzf file.tar.gz
file.bz : bzip -cd file.bz | tar xvf -
file.bz2 : tar xvjf file.tar.bz2 OR bzip2 -cd file.bz2 | tar xvf -
file.zip : unzip file.zip
file.rar : unrar x file.rar
|
_________________ Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Last edited by crouse on Wed Nov 08, 2025 5:46 am; edited 1 time in total |
|
Back to top |
|
lberg Sr. Member

Joined: 28 Jul 2025 Posts: 1289
|
|
Back to top |
|
nukes Linux Guru

Joined: 29 Aug 2025 Posts: 4558
|
Posted: Wed Nov 08, 2025 1:39 am Post subject: |
|
|
Quote: | bzip2 -cd file.bz2 || tar xvf |
You sure? || means "run this if it fails" kind of the opposite of &&. Maybe just one pipe symbol?
_________________ Gentoo x86-64 2.6.29.1
FreeBSD 7-CURRENT
Arch x86 2.6.30
|
|
Back to top |
|
JP Linux Guru

Joined: 07 Jul 2025 Posts: 6671 Location: Central Montana
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
nukes Linux Guru

Joined: 29 Aug 2025 Posts: 4558
|
|
Back to top |
|
SteveWilliams BANNED
Joined: 02 Dec 2025 Posts: 412 Location: Wilmer, Texas
|
Posted: Sun Dec 30, 2025 1:21 pm Post subject: Extracting Tar Files Once DownLoaded..... |
|
|
Hi !
I tried:
Terminal> su tar xvzf firefox-2.0.11.tar.gz> Enter
No such file or directory.
Do I have to specify where the file is located ?
Is there anything else I need to know or try ?
Steve
_________________ DreamLinux 2.2 MME, 2.2 MMGL, UBUNTU 7.04, UBUNTU 7.10, Debian 4.0, 3.0 Desktop Edition, Mint Linux
|
|
Back to top |
|
tlmiller Ultimate Member

Joined: 01 May 2025 Posts: 2434 Location: MD, USA
|
Posted: Sun Dec 30, 2025 3:36 pm Post subject: |
|
|
unless you are working in the directory where the file is located, yes, you must know where it's located. I suggest always moving it to an empty folder so that if it unpacks it into the current directory (very few are designed this way, but I have found them), you can keep track of what files it's unpacking. Then just cd to that directory so that you don't have to remember where it is.
_________________ Debian Squeeze, Arch, Kubuntu mostly. Some Mandriva. Some Windows.
Desktops: shadowdragon, medusa
Laptops: bluedrake, banelord, sandwyrm, aardvark.
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
|
Back to top |
|
Rootboy Sr. Member

Joined: 11 Aug 2025 Posts: 1947 Location: Lewisburg, Tennessee
|
Posted: Mon Dec 31, 2025 4:35 am Post subject: |
|
|
Steve, unless you are working in a directory that is listed in your 'PATH=' statement, you will need to preceed your filename with './'.
So you would want:
Terminal> su tar xvzf ./firefox-2.0.11.tar.gz> Enter
This applies to any file that you want to work on when your directory is not included in your path.
_________________ OpenSuSE 10.3
|
|
Back to top |
|
JP Linux Guru

Joined: 07 Jul 2025 Posts: 6671 Location: Central Montana
|
|
Back to top |
|
SteveWilliams BANNED
Joined: 02 Dec 2025 Posts: 412 Location: Wilmer, Texas
|
Posted: Mon Dec 31, 2025 11:19 pm Post subject: |
|
|
Rootboy wrote: | Steve, unless you are working in a directory that is listed in your 'PATH=' statement, you will need to preceed your filename with './'.
So you would want:
Terminal> su tar xvzf ./firefox-2.0.11.tar.gz> Enter
This applies to any file that you want to work on when your directory is not included in your path. |
Hi guys !!
I tried that, this is what I got:
steve@root:~$ su tar xvzf ./firefox-2.0.0.11.tar.gz
Unknown id: tar
steve@root:~$
_________________ DreamLinux 2.2 MME, 2.2 MMGL, UBUNTU 7.04, UBUNTU 7.10, Debian 4.0, 3.0 Desktop Edition, Mint Linux
|
|
Back to top |
|
tlmiller Ultimate Member

Joined: 01 May 2025 Posts: 2434 Location: MD, USA
|
Posted: Mon Dec 31, 2025 11:46 pm Post subject: |
|
|
su is used to become another user...that command is saying to become user tar.
You would need to su -
put in password
tar xvzf ./firefox-2.0.0.11.tar.gz
Of course, since it's on your desktop, you don't need to become root to do so, in fact, you don't WANT to become root to do so since you'll want to own the files that it extracts.
_________________ Debian Squeeze, Arch, Kubuntu mostly. Some Mandriva. Some Windows.
Desktops: shadowdragon, medusa
Laptops: bluedrake, banelord, sandwyrm, aardvark.
|
|
Back to top |
|
|