Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Creating Tarballs in a perl scripts

by aaron_baugher (Curate)
on Jun 11, 2012 at 20:53 UTC ( [id://975633]=note: print w/replies, xml ) Need Help??


in reply to Re: Creating Tarballs in a perl scripts
in thread Creating Tarballs in a perl scripts

The way dotfiles are usually missed in a situation like this is when the command is given a wildcard:

tar -czf file.tgz *

That will tar up everything beneath the current directory, except for any dotfiles in the current directory, because * in a shell doesn't match those (normally, though some shells might under some circumstances). The shell will interpolate the * to mean all non-dotfiles in the current directory, and tar will get them and anything under them (including any dotfiles in subdirecories).

The usual way around that is to tar up the current directory, rather than the contents:

tar -czf /tmp/file.tgz .

I don't know if this was the OP's problem, since I don't know what he had in $DEST, but it's a possibility.

Aaron B.
Available for small or large Perl jobs; see my home node.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (None)
    As of 2024-04-19 00:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found