- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to handle metacharacters through zip command
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
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
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
02-05-2013 03:10 PM
02-05-2013 03:10 PM
Hi--
While zipping a directory, which has few subdirectories having the dollar sign in their names, the zip command fails.
How do I fix this issue?
Thanks,
Allan
Solved! Go to Solution.
- Tags:
- zip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2013 03:24 PM
02-05-2013 03:24 PM
Re: How to handle metacharacters through zip command
(Why would you want files with "$" in them? These aren't Unix friendly.)
What error do you get?
I'm not sure why zip should care? The shell only sees the upper directory.
I don't know if the "-UN w" option will help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2013 03:47 PM
02-05-2013 03:47 PM
Re: How to handle metacharacters through zip command
Error: zip I/O error: No such file or directory. . zip error: Input file read failure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2013 07:56 PM
02-05-2013 07:56 PM
Re: How to handle metacharacters through zip command
> While zipping a directory, which has few subdirectories having the
> dollar sign in their names, the zip command fails.
A useful problem report would offer some basic info, like, for
example:
uname -a
zip -v
Actual command used.
Actual output from the command.
ls -l[R] <stuff which you were trying to archive>
> Error: zip I/O error: No such file or directory. . zip error: Input
> file read failure
Many things are possible, but, if this Zip program is even remotely
current, then I would not expect a name with a dollar sign to cause any
particular trouble. For example, using what I have lying around on a
convenient Mac OS X system:
bash-3.2$ zip3 dollar.zip -r .
adding: $dir$/ (stored 0%)
adding: $dir$/$name$ (stored 0%)
adding: fred$fred (stored 0%)
bash-3.2$ unzip61 -d fred dollar.zip
Archive: dollar.zip
creating: fred/$dir$/
extracting: fred/$dir$/$name$
extracting: fred/fred$fred
bash-3.2$ ls -lR fred
total 8
drwxr-xr-x 3 sms admin 102 Feb 5 21:39 $dir$
-rw-r--r-- 1 sms admin 5 Feb 5 21:33 fred$fred
fred/$dir$:
total 8
-rw-r--r-- 1 sms admin 5 Feb 5 21:38 $name$
Zip doesn't care about dollar signs. Like many programs, it does
care about permissions, so if _you_ can't read a file, then Zip probably
can't read it for you. But, with approximately no useful information,
and my weak psychic powers, I probably can't guess what the problem is
here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 04:20 AM
02-06-2013 04:20 AM
Re: How to handle metacharacters through zip command
are you sure the $ is not interpreted by the shell..
try with \$dir\$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 11:52 AM
02-06-2013 11:52 AM
Re: How to handle metacharacters through zip command
>are you sure the $ is not interpreted by the shell.
Allan did say subdirectories. And I assumed he was using zip -r on the parent directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 12:36 PM
02-06-2013 12:36 PM
Re: How to handle metacharacters through zip command
> [...] I assumed he was using zip -r on the parent directory.
_I_ assume that if he really wants an answer, then he'll supply
enough useful information to obviate such assuming and guessing, but so
far I see no evidence of that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 06:49 PM
02-06-2013 06:49 PM
Re: How to handle metacharacters through zip command
Yes, am using zip r *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 06:49 PM
02-06-2013 06:49 PM
Re: How to handle metacharacters through zip command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 07:47 PM
02-06-2013 07:47 PM
Re: How to handle metacharacters through zip command
> Yes, am using zip r *
Still not much useful information. This new copy+paste technology is
amazing. You should try it.
> Will try upgrading the version of zip tomm.
Would it hurt you to provide some useful information, as requested?
Around here, the oldest version I have, "Zip 2.32 (June 19th 2006)"
appears to have no more trouble with my test than the latest released
version, "Zip 3.0 (July 5th 2008)" (or the latest development code,
either).