Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-13-2006, 08:40 AM
|
#1
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Rep:
|
what is difference between /usr/bin/7za /usr/bin/7z
I have two binaries from the package p7zip in Ubuntu. What is the difference? Which one should be used?
Code:
ubuntu@ubuntu:/var/cache/apt/archives$ sudo updatedb;slocate 7z | grep bin
/usr/bin/7za
/usr/bin/7z
ubuntu@ubuntu:/var/cache/apt/archives$
I can see one is smaller than the other.
Code:
ubuntu@ubuntu:/var/cache/apt/archives$ ls -l /usr/bin/ | grep 7z
-rwxr-xr-x 1 root root 39 2005-11-28 15:28 7z
-rwxr-xr-x 1 root root 997864 2005-11-28 15:28 7za
ubuntu@ubuntu:/var/cache/apt/archives$
Compare these two.
Code:
ubuntu@ubuntu:/var/cache/apt/archives$ 7z
7-Zip 4.30 beta Copyright (c) 1999-2005 Igor Pavlov 2005-11-18
p7zip Version 4.30 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on)
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
<Commands>
a: Add files to archive
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
<Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-l: don't store symlinks; store the files/directories they point to
CAUTION : the scanning stage can never end because of symlinks like '..'
(ex: ln -s .. ldir)
-m{Parameters}: set compression Method (see the manual)
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
(CAUTION: this flag does not do what you think, avoid using it)
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-so: write data to stdout (eg: % 7z a dummy -tgzip Doc.txt > archive.gz)
-t{Type}: Set type of archive
-v{Size}[b|k|m|g]: Create volumes
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-w[path]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
and
Code:
ubuntu@ubuntu:/var/cache/apt/archives$ 7za
7-Zip (A) 4.30 beta Copyright (c) 1999-2005 Igor Pavlov 2005-11-18
p7zip Version 4.30 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on)
Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
<Commands>
a: Add files to archive
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
<Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-l: don't store symlinks; store the files/directories they point to
CAUTION : the scanning stage can never end because of symlinks like '..'
(ex: ln -s .. ldir)
-m{Parameters}: set compression Method (see the manual)
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
(CAUTION: this flag does not do what you think, avoid using it)
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-so: write data to stdout (eg: % 7z a dummy -tgzip Doc.txt > archive.gz)
-t{Type}: Set type of archive
-v{Size}[b|k|m|g]: Create volumes
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-w[path]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
ubuntu@ubuntu:/var/cache/apt/archives$
Also compare these two.
Code:
P7ZIP(1) P7ZIP(1)
NAME
7-Zip - A file archiver with highest compression ratio
SYNOPSIS
7z [adeltux] [-] [SWITCH] <ARCHIVE_NAME> <ARGUMENTS>...
DESCRIPTION
7-Zip is a file archiver with the highest compression ratio. The pro‐
gram supports 7z (that implements LZMA compression algorithm), ZIP,
CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression
ratio in the new 7z format is 30-50% better than ratio in ZIP format.
7z uses plugins to handle archives.
FUNCTION LETTERS
a Add
d Delete
e Extract
l List
t Test
u Update
x eXtract with full paths
SWITCHES
Code:
P7ZIP(1) P7ZIP(1)
NAME
7-Zip - A file archiver with highest compression ratio
SYNOPSIS
7za [adeltux] [-] [SWITCH] <ARCHIVE_NAME> <ARGUMENTS>...
DESCRIPTION
7-Zip is a file archiver with the highest compression ratio. The pro‐
gram supports 7z (that implements LZMA compression algorithm), ZIP,
CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression
ratio in the new 7z format is 30-50% better than ratio in ZIP format.
7za is a stand-alone executable. 7za handles less archive formats than
7z, but does not need any others.
FUNCTION LETTERS
a Add
d Delete
e Extract
l List
t Test
u Update
x eXtract with full paths
SWITCHES
that is just part of the man pages. the man pages are too long to list them both here.
|
|
|
|
08-13-2006, 09:12 AM
|
#2
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
Type "file /usr/bin/7z" and "file/usr/bin/7za".
If you see "ascii" or "text" or "script" you can cat the file to see what is in it. If you see ELF it is a binary. (You can use strings to see text embedded but it usually isn't much help.)
Given that 7z is only 39 bytes my guess is that it is just a script that calls 7za. Sometimes files do different things based simply on the name and it may be that you see the "(A)" stuff in the usage only because you called it with name 7za directly. If so copying 7za to 7zb and running the latter might make it replace the "(A)" stuff in usage with "(B)" stuff or might make it just not work because its an unexpected name.
Haven't used 7z or 7za myself.
|
|
|
|
08-13-2006, 09:16 AM
|
#3
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Hi,
Also answered this in your other thread:
7za is a stand-alone executable. 7za handles less archive formats than 7z, but does not need any others.
|
|
|
|
08-13-2006, 09:31 AM
|
#4
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Original Poster
Rep:
|
ubuntu@ubuntu:~$ file /usr/bin/7z
/usr/bin/7z: Bourne shell script text executable
ubuntu@ubuntu:~$ file /usr/bin/7za
/usr/bin/7za: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped
ubuntu@ubuntu:~$ cat /usr/bin/7z
#! /bin/sh
exec /usr/lib/p7zip/7z "$@"
ubuntu@ubuntu:~$ ls -l /usr/lib/p7zip/
7z Codecs/ Formats/
ubuntu@ubuntu:~$ ls -l /usr/lib/p7zip/7z
-rwxr-xr-x 1 root root 350980 2005-11-28 15:28 /usr/lib/p7zip/7z
ubuntu@ubuntu:~$
|
|
|
|
08-13-2006, 10:30 AM
|
#5
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Original Poster
Rep:
|
ubuntu@ubuntu:~$ file /usr/lib/p7zip/7z
/usr/lib/p7zip/7z: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped
ubuntu@ubuntu:~$
what is the difference between /usr/lib/p7zip/7z and /usr/bin/7za?
|
|
|
|
08-13-2006, 10:31 AM
|
#6
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Original Poster
Rep:
|
ubuntu@ubuntu:~$ file /usr/lib/p7zip/7z
/usr/lib/p7zip/7z: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped
ubuntu@ubuntu:~$
what is the difference between /usr/lib/p7zip/7z and /usr/bin/7za?
|
|
|
|
08-13-2006, 10:37 AM
|
#7
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Hi,
Like I said before:
7za is a standalone version, 7z is not (needs other progs to be able to run/use certain options).
|
|
|
|
08-13-2006, 11:10 AM
|
#8
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Original Poster
Rep:
|
Which one should I use? 7za?
Last edited by fakie_flip; 08-13-2006 at 11:14 AM.
|
|
|
|
08-13-2006, 11:27 AM
|
#9
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Hi,
7za would be best, but it supports less archives then 7z. You could end up having to do it a second time with 7z.
If you don't mind the (minimal) extra time to execute: Use 7z for all cases.
Hope this helps.
|
|
|
|
08-14-2006, 09:22 PM
|
#10
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Original Poster
Rep:
|
I only got p7zip to use with the archives that have the highest compression ratio using the best algorithm. Do they both work for the archives that look like this?
archive.7z
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:17 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|