Hello Monks,

I've got a problem with a program I wrote a few years back - a backup program - that works fairly well and is maturing, however it does have a problem. One of the things this program does is create TGZ archives.

The problem I'm having, and I have yet to find a solution to this vexing issue, is that no matter what I do it will not grab .hidden files. I've tried altering the manner in which I issue the command to create the archive within the program; I've tried using the Tar module; I've tried turning on and off the BASH command to allow .hidden files to be scooped up, but all with no joy.

The command I'm using and have embedded in the program is this:

`tar -zcf $filename $DEST`;

It does a wonderful job of grabbing everything in the directory it's working in: all the directories its supposed to backup are kept in a database which it reads each time the program runs and loads the directory paths into an array. For the life of me I can't understand why it is not getting the hidden files. When I run the command from the command line all files are archived as expected including the .hidden files.

Can anyone shed some light on this vexing problem for me?


In reply to Creating Tarballs in a perl scripts by mdw1982

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.