LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2010, 10:44 AM   #1
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Rep: Reputation: 0
Installing and using p7zip?


I'm new to Linux and have a CentOS system, i downloaded p7zip (a file that extracts rar, 7z etc) but don't know how to install it or use it, would someone help me out here?

Last edited by spider99; 05-17-2010 at 10:47 AM.
 
Old 05-17-2010, 11:02 AM   #2
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi,

Firstly I assume you've downloaded the binary install from SourceForge?

In that case...this is what you do:

1. Download the tarball to your machine.

2. Move the tarball to the location of your choice:

Code:
# mv /apps/p7zip_9.04_x86_linux_bin.tar.bz2 /your/location/
3. Unpack the tarball:

Code:
# tar -xjf /apps/p7zip_9.04_x86_linux_bin.tar.bz2
4. Run the executable:

Code:
# ./7za

7-Zip (A) 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Hope this helps,

Cheers,
Yas
 
Old 05-17-2010, 11:26 AM   #3
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Ty but when i try

Quote:
# ./7za file.7z
or
Quote:
# ./7za
it says

Quote:
No such file or directory
And i'm using the terminal in the directory of the file i want to extract

Last edited by spider99; 05-17-2010 at 11:33 AM.
 
Old 05-17-2010, 11:33 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
First cd to the directory created by the untar command.
Why don't you use rpm?
http://www.7-zip.org/download.html
http://packages.sw.be/p7zip/
 
Old 05-17-2010, 11:44 AM   #5
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
I already installed the p7zip-4.58-1.el5.rf.i386.rpm for centos but still when i excute the command it still says the same thing
 
Old 05-17-2010, 11:46 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What is the output from
Code:
whereis 7za
If you installed the rpm the commands are
Code:
7z   7za  7zr
 
Old 05-17-2010, 11:56 AM   #7
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
The rpm is already installed, the command i'm using is

Quote:
# ./7za /Desktop/file.7z
Quote:
# ./7za file.7z
but it returns with the error [No such file or directory]. The file i wanna extract is located at ./Desktop/file.7z.
 
Old 05-17-2010, 11:59 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
If the rpm is installed, no need to install the tar file.
try
Code:
7za /Desktop/file.7z
Code:
./7za
means the file you want to execute is in the current directory.
 
Old 05-17-2010, 12:24 PM   #9
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
7za /Desktop/file.7z
It errors- Incorrect command line.
 
Old 05-17-2010, 12:29 PM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
what is the output from
Code:
whereis 7za
Did you read the manfiles?
Code:
man 7za
man 7z
man 7zr
 
Old 05-17-2010, 12:41 PM   #11
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
The output from 7za is at /usr/bin/7za however the output from 7z and 7zr is blank.

I'm unsure of the way the command should be, would anyone provide an example on how to extract a file using p7zip?

Last edited by spider99; 05-17-2010 at 12:54 PM.
 
Old 05-17-2010, 01:02 PM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
From the manpage and 7za -h
Code:
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
 
Old 05-17-2010, 01:05 PM   #13
spider99
LQ Newbie
 
Registered: May 2010
Posts: 19

Original Poster
Rep: Reputation: 0
I read the manual but it says incorrect command line or no such archive thus me needing an example :P
 
Old 05-17-2010, 01:13 PM   #14
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
If you read the manpage:
Code:
7za e path_to_whatever_file_you_want_to_extract.7z
 
Old 05-20-2010, 07:38 AM   #15
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by spider99 View Post
I read the manual but it says incorrect command line or no such archive thus me needing an example :P
http://dotnetperls.com/7-zip-examples
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
p7zip fakie_flip Linux - Software 4 05-21-2017 07:45 AM
p7zip man page? mpmackenna Linux - Newbie 1 10-11-2007 08:40 AM
using p7zip with Konqueror fakie_flip Linux - Software 0 08-20-2006 03:32 AM
howto for p7zip please fakie_flip Linux - Software 4 08-13-2006 09:56 AM
Installed p7zip via apt-get... Where is it? GNewbie MEPIS 4 08-11-2006 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration