Menu

A flaw in -r option

Zbigniew
2014-04-09
2014-04-13
  • Zbigniew

    Zbigniew - 2014-04-09

    Say, we've got following directory tree (within any selected directory):

    /a
    /b/c
    /c

    The directories do contain a few files:

    -- a
    -- b
    `-- c
    `-- 4.txt
    -- c
    `-- 3.txt

    Now I'm going to archive just the "c" directory, with its entire contents:

    7z a -r c.7z c

    Unfortunately, the created archive will contain both "c" (with 3.txt) and
    "b/c" (with 4.txt) which obviously WASN'T what I requested, right? Seems to
    be a flaw in a need for a fix.

    7zip for Linux (on Slackware 14.1, 64-bit):

    v+

    7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
    p7zip Version 9.20 (locale=pl_PL,Utf16=on,HugeFiles=on,2 CPUs)

    v-

    --
    Zbigniew

     
  • LBP

    LBP - 2014-04-13

    You are telling 7zip to look recursively for "c" and add it to your archive. So this is exactly what you requested. The flaw is the "-r" parameter in your command line.

     

Log in to post a comment.