Goal: read list of dirs from STDIN, and archive only the dirs not the contents.
If the list is 5 dirs then the archive is exactly 5 dirs, with none of the 
contents in 
those dirs.

--
thanks,
Tom
--
Example that fails:

    $ tar --version
    tar (GNU tar) 1.29
    $ echo ~/.config/ | tar -cvf /dev/null -T - --no-recursion 2>&1 |head -4
    tar: Removing leading `/' from member names
    /a/myself/.config/
    /a/myself/.config/ranger/
    /a/myself/.config/ranger/history

>From 'info tar':

    Specifying '--no-recursion' is a way to tell 'tar' to grab only the 
directory
    entries given to it, adding no new files on its own.  To summarize, if
    you use 'find' to create a list of files to be stored in an archive, use
    it as follows:
         
         $ find DIR TESTS | \
           tar -cf ARCHIVE -T - --no-recursion

Reply via email to