USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Extracting Compressed Files

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands
View previous topic :: View next topic  
Author Message
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Tue Nov 07, 2024 5:18 am    Post subject: Extracting Compressed Files Reply with quote

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, 2024 5:46 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address
lberg
Sr. Member


Joined: 28 Jul 2024
Posts: 1289

PostPosted: Tue Nov 07, 2024 5:32 am    Post subject: Reply with quote

Cool Wink Nice



_________________
2 Computers: Arch Linux, 64-bit
3 Computers: Arch Linux, 32-bit
Back to top
View user's profile Send private message
nukes
Linux Guru


Joined: 29 Aug 2024
Posts: 4558

PostPosted: Wed Nov 08, 2024 1:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
JP
Linux Guru


Joined: 07 Jul 2024
Posts: 6671
Location: Central Montana

PostPosted: Wed Nov 08, 2024 5:36 am    Post subject: Reply with quote

Thanks crouse .... I'll wait on your reply to nukes on the double pipes (bzips) Wink



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Wed Nov 08, 2024 5:46 am    Post subject: Reply with quote

Nukes was right. Wink



_________________
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
Back to top
View user's profile Send private message Visit poster's website AIM Address
nukes
Linux Guru


Joined: 29 Aug 2024
Posts: 4558

PostPosted: Thu Nov 09, 2024 10:13 pm    Post subject: Reply with quote

JP wrote:
Thanks crouse .... I'll wait on your reply to nukes on the double pipes (bzips) Wink

Mad oh ye of little faith Very Happy



_________________
Gentoo x86-64 2.6.29.1
FreeBSD 7-CURRENT
Arch x86 2.6.30
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
SteveWilliams
BANNED


Joined: 02 Dec 2024
Posts: 412
Location: Wilmer, Texas

PostPosted: Sun Dec 30, 2024 1:21 pm    Post subject: Extracting Tar Files Once DownLoaded..... Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
tlmiller
Ultimate Member


Joined: 01 May 2024
Posts: 2434
Location: MD, USA

PostPosted: Sun Dec 30, 2024 3:36 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Mon Dec 31, 2024 3:28 am    Post subject: Reply with quote

thanks! Very Happy i always forget them whenever i need to use them Razz, i need to add your .bashrc section to mine again Razz



_________________
desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
Back to top
View user's profile Send private message Visit poster's website AIM Address
Rootboy
Sr. Member


Joined: 11 Aug 2024
Posts: 1947
Location: Lewisburg, Tennessee

PostPosted: Mon Dec 31, 2024 4:35 am    Post subject: Reply with quote

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
View user's profile Send private message
JP
Linux Guru


Joined: 07 Jul 2024
Posts: 6671
Location: Central Montana

PostPosted: Mon Dec 31, 2024 6:55 am    Post subject: Reply with quote

nukes wrote:
JP wrote:
Thanks crouse .... I'll wait on your reply to nukes on the double pipes (bzips) Wink

Mad oh ye of little faith Very Happy


But ... but ..... but .... Idea that was having faith in your post nukes Exclamation yeah ..... that's what it was Razz Razz Rolling Eyes Rolling Eyes Laughing Laughing



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
SteveWilliams
BANNED


Joined: 02 Dec 2024
Posts: 412
Location: Wilmer, Texas

PostPosted: Mon Dec 31, 2024 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
tlmiller
Ultimate Member


Joined: 01 May 2024
Posts: 2434
Location: MD, USA

PostPosted: Mon Dec 31, 2024 11:46 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse