Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Error using system() and tar with several options

by Crackers2 (Vicar)
on Apr 13, 2009 at 21:38 UTC ( #757286=note: print w/ replies, xml ) Need Help??


in reply to Error using system() and tar with several options

When using the multi-argument form of system, the arguments get passed directly to the binary so there's no implicit split on whitespace. So your tar command sees the "czv --exclude-from=$excludes -f" as one big parameter and tries to interpret each character as a short option.

Do this instead:

my @args = ("/bin/tar", "czv", "--exclude-from=$excludes", "-f", $st +orageLocation.$archiveName, $archiveDir );


Comment on Re: Error using system() and tar with several options
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://757286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-07-23 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (135 votes), past polls