- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to zip / compress a directory ?
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
Discussions
Discussions
Forums
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
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-06-2007 08:58 PM
тАО06-06-2007 08:58 PM
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 09:02 PM
тАО06-06-2007 09:02 PM
Re: how to zip / compress a directory ?
tar cvf /tmp/tarfile.tar /directory/
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 09:51 PM
тАО06-06-2007 09:51 PM
Re: how to zip / compress a directory ?
You can't compress a directory.
You can compress/gzip the files inside:
$ cd /dir ; compress *
or as Steven suggested you can create a archive of the directory
$ tar cvf dir.tar /dir
or compressed:
$ tar cvf - /dir | compress >dir.tar.Z
see compress(1), gzip(1)
rgds
HGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 10:01 PM
тАО06-06-2007 10:01 PM
Re: how to zip / compress a directory ?
using the default software on the OS, you can easily achieve this using two steps.
Step 1. Archive files together
tar -cvf /tmp/DIR1.TAR ./
Step 2. Compress them together
gzip -S .Z /tmp/DIR1.TAR
You should also be aware of absolute/relative path issues.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 11:34 PM
тАО06-06-2007 11:34 PM
Re: how to zip / compress a directory ?
1> compress
The compress utility will attempt to reduce the size of the named files by using adaptive Lempel-Ziv coding. Except when
the output is to the standard output, each file will be replaced by one with the extension .Z, while keeping the
same ownership modes, change times and modification times.
compress [-fv] [ -b bits ] [ file ]
compress [-cfv] [ -b bits ] [ file ]
2>gzip
Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes,access and modification times.By default, gzip keeps the original file name and timestamp in the compressed file.
gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
3> tar
Mentioned above
Thanks & Regards
Reshma Malusare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 11:37 PM
тАО06-06-2007 11:37 PM
Re: how to zip / compress a directory ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2007 11:54 PM
тАО06-06-2007 11:54 PM
Re: how to zip / compress a directory ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 01:28 AM
тАО06-07-2007 01:28 AM
Re: how to zip / compress a directory ?
information. For example: Why?
If you intend to transfer the files to a
non-UNIX system, then the Info-ZIP [Un]Zip
programs would probably make more sense. If
you're just trying to save some space on your
HP-UX system, of if you intend to transfer
the files to another UNIX system, then a
"tar" pipeline into gzip or bzip2 would
probably make more sense.
For a complete (and useful) answer, ask a
complete question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 01:23 PM
тАО06-07-2007 01:23 PM