- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- convert the files to .zip file
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
05-27-2007 07:41 PM
05-27-2007 07:41 PM
convert the files to .zip file
how to convert any file in different extention in unix to .zip extention
and the unzip command where is extract the files?, only to the current directory!
thanks and best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2007 08:28 PM
05-27-2007 08:28 PM
Re: convert the files to .zip file
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1130788
To unzip, you just use:
$ unzip foo.zip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2007 08:40 PM
05-27-2007 08:40 PM
Re: convert the files to .zip file
here is different question i need to how zip file not unzip. and the unzip were is saved the extract of the zip file?, if in the default directory how to save to file i am created
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2007 12:31 AM
05-28-2007 12:31 AM
Re: convert the files to .zip file
unzip has the -d switch which you can use to specify the directory where you want to extrat the files.
below a quote from man unzip:
...
[-d exdir]
An optional directory to which to extract files. By default, all files and subdirectories are recreated in the current directory; the -d option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). This option need not appear at the end of the command line; it is also accepted before the zipfile specification (with the normal options), immediately after the zipfile specification, or between the file(s) and the -x option. The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed. In particular, ``-d ~'' (tilde) is expanded by Unix C shells into the name of the user's home directory, but ``-d~'' is treated as a literal subdirectory ``~'' of the current directory.
...
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2007 12:47 AM
05-28-2007 12:47 AM
Re: convert the files to .zip file
zip [opts] archive.zip file1 file2 [...]
> [...] and the unzip were is saved the
> extract of the zip file?
Normally, Zip saves the (relative) path to a
file in the archive, and UnZip will recreate
that path when the file is extracted. For
example:
td176> ls -lR a b
a:
total 8
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 a.txt
b:
total 8
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 b.txt
td176> zip ab.zip a/a.txt b/b.txt
adding: a/a.txt (stored 0%)
adding: b/b.txt (stored 0%)
td176> mkdir unz
td176> cd unz
td176> unzip ../ab.zip
Archive: ../ab.zip
extracting: a/a.txt
extracting: b/b.txt
td176> ls -lR
total 16
drwxrwxrwx 2 antinode 513 4096 May 28 08:37 a
drwxrwxrwx 2 antinode 513 4096 May 28 08:37 b
./a:
total 8
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 a.txt
./b:
total 8
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 b.txt
Both Zip and UnZip have "-j" options which
prevent recording (Zip) or recreating (UnZip)
the directories in the paths to the files;
td176> rm -rf *
td176> ls -l
total 0
td176> unzip -j ../ab.zip
Archive: ../ab.zip
extracting: a.txt
extracting: b.txt
td176> ls -l
total 16
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 a.txt
-rw-rw-rw- 1 antinode 513 5 May 28 08:35 b.txt
Many things are possible. It might help if
you could give an example of what you would
like to happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2007 03:51 AM
05-28-2007 03:51 AM