soonix:

Heh, heh! In fact, when I was writing that response, I thought that tar would have such an option. But after listing through the first three or so pages of the dox, I got tired of looking. Then I thought I'd just xargs to convert the file into a list of command-line arguments. I nearly wrote it as cat mylist.txt | xargs | ... but didn't want to earn another "useless use of cat" award, so I just used xargs <mylist.txt to do the task.

After your response, I again looked at man tar and found the option ... on the thirteenth page! Since my terminal is 57 lines long, that seems a bit excessive. I'm thinking that the man page for tar ought to be rearranged a bit, as that sounds like an option that's generally useful, and there are quite a few options that seem to be much more specialized, and hence useful in fewer situations. (I've never needed --hole-detection or --check-device both of which are on page 4.) Now that I'm aware of -T, though, I'll hopefully remember it for the next time. ;^)

...roboticus

When your only tool is tar, all problems look like you're gonna have to read "War and Peace", possibly several times.


In reply to Re^3: Copying a list of files from a directory to a new directory by roboticus
in thread Copying a list of files from a directory to a new directory by ramjamman

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.