- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ZIPPING in HP-UX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 10:54 PM
06-28-2006 10:54 PM
I have some 1000 files in a dir say /home/pp/ and i wish to zip all of them into one file at another location say /home/pp/tmp/
Could you please let me know the command to zip on HP-UX and then unzip for using them.
Thanks a lot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:03 PM
06-28-2006 11:03 PM
Re: ZIPPING in HP-UX
You can use # /opt/java1.4/bin/jar -cvf /home/pp/tmp/files.zip /home/pp/*
For unzipping, you can use
# /opt/java1.4/bin/jar -xvf
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:03 PM
06-28-2006 11:03 PM
Re: ZIPPING in HP-UX
In most cases bzip2 works best
src # cd /home/pp
src # tar cf - . | bzip2 >/tmp/pp.tbz
src # scp /tmp/pp.tbz dst:/tmp/
dst # cd /home/pp
dst # bzip2 -d
If it is all stripped binaries, jpegs, or other files that do not compress very well, or if bzip2 is not available, use gzip
src # cd /home/pp
src # tar cf - . | gzip >/tmp/pp.tbz
src # scp /tmp/pp.tbz dst:/tmp/
dst # cd /home/pp
dst # gzip
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:03 PM
06-28-2006 11:03 PM
Re: ZIPPING in HP-UX
tar -cvf some_name.tar /path_to_files/
compress some_name.tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:06 PM
06-28-2006 11:06 PM
Re: ZIPPING in HP-UX
You can use gzip which comes with HP-UX by default, Location : /usr/contrib/bin/gzip
Uncompressing, You can use gunzip or gzip -d
Location : /usr/contrib/bin/gunzip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:08 PM
06-28-2006 11:08 PM
Re: ZIPPING in HP-UX
http://hpux.cs.utah.edu/hppd/hpux/Misc/zip-2.31/
http://hpux.cs.utah.edu/hppd/hpux/Misc/unzip-5.52/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:12 PM
06-28-2006 11:12 PM
Re: ZIPPING in HP-UX
If you have Java SDK installed, you will have "jar" utility by default. No need to install any other softwares for zipping/unzipping.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:20 PM
06-28-2006 11:20 PM
Re: ZIPPING in HP-UX
tar -cvf some_name.tar /path_to_files/
compress some_name.tar
But, how to untar and uncompress some_name.tar ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2006 11:26 PM
06-28-2006 11:26 PM
Re: ZIPPING in HP-UX
# compress some_name.tar
1. That will use twice the amout of diskspace you would have needed if you would have used my piping solution
2. compress is an ANCIENT (and bad) compression algorithm. It eats more CPU than it compresses your data
3. gzip is standard, why not use it?
compress's counterpart is uncompress
# uncompress some_name.tar
# tar xvf some_name.tar
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2006 01:48 PM
06-29-2006 01:48 PM
Re: ZIPPING in HP-UX
I use gzip and it works very well. I transfer large files over ftp and have never had a problem.
If you decide to use gzip, you may want to down load the latest release. HP-UX 11i doesn't have the latest and so it has a problem handling large files. I can't remember it is 200M or 2Gig, but with later releases there is no problem.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2006 06:28 PM
06-29-2006 06:28 PM
Re: ZIPPING in HP-UX
I also appreciate gzip, but the problem is that - source dir IF i give gzip all the file names will get zipped and renamed to .gz. So I guess first i need to copy all 1000+ files to some tmp dir, gzip them there and then do ftp.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2006 06:37 PM
06-29-2006 06:37 PM
Re: ZIPPING in HP-UX
# cd /home/dir
# tar cvf - . | gzip > /tmp/home_dir.tgz
tar collects the files into a single tar archive, but -f - causes tar to not use a file, but send the archive stream to STDOUT. That stream in turn is compressed by gzip and stored in a file.
Not only has that a speed advantage, but since you now use gzip on a stream, you won't hit gzip's 2 Gb limit that some older versions have.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2006 01:02 AM
06-30-2006 01:02 AM
Solution# tar -cvf temp.tar tmp
# /usr/contrb/bin/gzip temp.tar
# /usr/contrib/bin/gzip temp.tar
This creates temp.tar.gz
You can then copy to any directory you want.
To uncompress:
# cd /directory_you_want
# /usr/contrib/bin/gunzip temp.tar.gz
# tar -xvf temp.tar
# ll tmp
CHEERS,
f.halili