Professional Web Applications Themes

GNUtar doesn't fit my needs... - Linux Setup, Configuration & Administration

Hi all, Assuming the following /my/main/dir/subdir1 ............./subdir2 ............./subdir3 ............./subdir4 I'd like to GNUtar /my/main/dir with all subdirs BUT subdir1 I tried # tar -c -v -z -P -f /tmp/backup.tgz -X /tmp/exclude.tar /my/main/dir -P to keep leading "/" -X pointing to the file containing the files to exclude # cat /tmp/exclude.tar /my/main/dir/subdir1/* # The command achieve with no errors, but subdir1 and all included in keep on archiving !!! I tried modifying the content of /tmp/exclude.tar as my/main/dir/* - that is no leading / - BUT the result is the same. What's happening ? Any help welcome. Regards JLB :-)...

  1. #1

    Default GNUtar doesn't fit my needs...

    Hi all,

    Assuming the following

    /my/main/dir/subdir1
    ............./subdir2
    ............./subdir3
    ............./subdir4

    I'd like to GNUtar /my/main/dir with all subdirs BUT subdir1

    I tried
    # tar -c -v -z -P -f /tmp/backup.tgz -X /tmp/exclude.tar /my/main/dir

    -P to keep leading "/"
    -X pointing to the file containing the files to exclude
    # cat /tmp/exclude.tar
    /my/main/dir/subdir1/*
    #

    The command achieve with no errors, but subdir1 and all included in keep
    on archiving !!!

    I tried modifying the content of /tmp/exclude.tar as
    my/main/dir/* - that is no leading / -
    BUT the result is the same.

    What's happening ?

    Any help welcome.

    Regards

    JLB :-)



    Jean-Luc Guest

  2. #2

    Default Re: GNUtar doesn't fit my needs...



    Jean-Luc BEAUDET wrote: 

    tar -czvPf /tmp/backup.tgz /my/main/dir/subdir[2-4]



    Sayantan Guest

  3. #3

    Default Re: GNUtar doesn't fit my needs...

    LOL !

    subdir{n} was just an example; i am meaning any different name with no
    relation each other...

    Thx :-)

    Sayantan Sur wrote:
     
    >
    >
    > tar -czvPf /tmp/backup.tgz /my/main/dir/subdir[2-4]
    >
    >
    >[/ref]

    Jean-Luc Guest

  4. #4

    Default Re: GNUtar doesn't fit my needs...

    Jean-Luc BEAUDET wrote: 

    What does 'tar --version' show? Using "tar (GNU tar) 1.13.25" it works
    just fine here (Debian/testing system).
    John-Paul Guest

  5. #5

    Default Re: GNUtar doesn't fit my needs...

    Humm, maybe a little buggy...

    tar --version replies
    tar (GNU tar) 1.13.19

    Sure it could be an older version.

    :-\

    John-Paul Stewart wrote:
     
    >
    >What does 'tar --version' show? Using "tar (GNU tar) 1.13.25" it works
    >just fine here (Debian/testing system).
    >[/ref]


    Jean-Luc Guest

Similar Threads

  1. Replies: 0
    Last Post: September 8th, 10:15 PM
  2. Replies: 0
    Last Post: September 8th, 10:15 PM
  3. Replies: 0
    Last Post: September 8th, 08:59 PM
  4. Replies: 0
    Last Post: September 8th, 08:49 PM
  5. GNUtar doesn't fit my needs...
    By Jean-Luc BEAUDET in forum Linux / Unix Administration
    Replies: 4
    Last Post: November 21st, 01:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139