Professional Web Applications Themes

how can I exclude file in tar file - AIX

man backup - DT "Kenneth" <kenneth@cde.com> wrote in message news:bh5l64$noh5@rain.i-cable.com... > I want to tar up the whole filesystem but want to exclude some directories. > I have try the --exlcude qualifier, but it just don't work in AIX 4.3.3 > ML10, I then check the man page and it didn't mention how I can do it. > > Any help? > >...

  1. #1

    Default Re: how can I exclude file in tar file

    man backup

    - DT

    "Kenneth" <kenneth@cde.com> wrote in message
    news:bh5l64$noh5@rain.i-cable.com...
    > I want to tar up the whole filesystem but want to exclude some
    directories.
    > I have try the --exlcude qualifier, but it just don't work in AIX 4.3.3
    > ML10, I then check the man page and it didn't mention how I can do it.
    >
    > Any help?
    >
    >

    DT Guest

  2. #2

    Default Re: how can I exclude file in tar file

    So the tar command cannot do it AIX? I remember it can be done in Linux and
    HP True 64 Unix.

    "DT" <odn@sinaman.com> bl news:bh5o2v$hbv1@imsp212.netvigator.com g
    ....
    > man backup
    >
    > - DT
    >
    > "Kenneth" <kenneth@cde.com> wrote in message
    > news:bh5l64$noh5@rain.i-cable.com...
    > > I want to tar up the whole filesystem but want to exclude some
    > directories.
    > > I have try the --exlcude qualifier, but it just don't work in AIX 4.3.3
    > > ML10, I then check the man page and it didn't mention how I can do it.
    > >
    > > Any help?
    > >
    > >
    >
    >


    Kenneth Guest

  3. #3

    Default Re: how can I exclude file in tar file

    "Kenneth" <kenneth@cde.com> wrote in message
    news:bh5l64$noh5@rain.i-cable.com...
    > I want to tar up the whole filesystem but want to exclude some
    directories.
    > I have try the --exlcude qualifier, but it just don't work in AIX 4.3.3
    > ML10, I then check the man page and it didn't mention how I can do it.
    >
    > Any help?
    >
    You can always install gnu tar (see at the bull archive). It
    supports --exclude.


    Nenad Guest

  4. #4

    Default Re: how can I exclude file in tar file

    [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    > Or just do :
    > # tar cvf tarfile.tar !{filetoexclude}
    >
    > Ben
    tar: !test.exclude.file: A file or directory in the path name does not
    exist.

    Why did you think that would work? You must be using some version of
    tar that I don't have...

    -dwiv (CATE/AIX)
    Dwivian Guest

  5. #5

    Default Re: how can I exclude file in tar file

    [email]dwivian@earthlink.net[/email] (Dwivian) wrote in message news:<b5cff289.0308130641.1bd5769b@posting.google. com>...
    > [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    > > Or just do :
    > > # tar cvf tarfile.tar !{filetoexclude}
    > >
    > > Ben
    >
    > tar: !test.exclude.file: A file or directory in the path name does not
    > exist.
    >
    > Why did you think that would work? You must be using some version of
    > tar that I don't have...
    >
    > -dwiv (CATE/AIX)
    I'm guessing you'll just have to do a find and pipe it to a grep -v,
    then pipe that to tar -cvf -

    Chris
    Chris Guest

  6. #6

    Default Re: how can I exclude file in tar file

    On 13 Aug 2003 14:29:31 -0700,
    Chris <chrish@po.wr.com> wrote:

    >dwivian@earthlink.net (Dwivian) wrote in message news:<b5cff289.0308130641.1bd5769b@posting.google. com>...
    >> [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    >> > Or just do :
    >> > # tar cvf tarfile.tar !{filetoexclude}
    >> >
    >> > Ben
    >>
    >> tar: !test.exclude.file: A file or directory in the path name does not
    >> exist.
    >>
    >> Why did you think that would work? You must be using some version of
    >> tar that I don't have...
    >>
    >> -dwiv (CATE/AIX)
    >
    >I'm guessing you'll just have to do a find and pipe it to a grep -v,
    >then pipe that to tar -cvf -
    >

    Stop guessing and RTFM. Pay attention to that AIX version of tar supports
    the -L option so:

    - Write a file containing the list of files to backup
    - Run the AIX tar thus:

    tar -c -v -f tarfile.tar -L filelistfile

    GNU tar has similar options but with a different name so again: RTFM, this
    time the manual for GNU tar.


    Villy
    Villy Kruse Guest

  7. #7

    Default Re: how can I exclude file in tar file

    [email]dwivian@earthlink.net[/email] (Dwivian) wrote in message news:<b5cff289.0308130641.1bd5769b@posting.google. com>...
    > [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    > > Or just do :
    > > # tar cvf tarfile.tar !{filetoexclude}
    > >
    > > Ben
    >
    > tar: !test.exclude.file: A file or directory in the path name does not
    > exist.
    >
    > Why did you think that would work? You must be using some version of
    > tar that I don't have...
    >
    > -dwiv (CATE/AIX)
    Strangely enough I didn't just sit and think it would work, I KNOW it works
    as I use it every day on both Solaris and AIX. See below :

    # tar cvf tarfile.tar !(file1)
    a file2 0K
    # tar tvf tarfile.tar
    tar: blocksize = 3
    -rw-r--r-- 0/1 0 Aug 15 15:20 2003 file2

    Ben
    Ben Jackson Guest

  8. #8

    Default Re: how can I exclude file in tar file

    "Ben Jackson" <ben.jackson@aah.co.uk> schrieb im Newsbeitrag
    news:d06d98e2.0308150625.63ae2569@posting.google.c om...
    > [email]dwivian@earthlink.net[/email] (Dwivian) wrote in message
    news:<b5cff289.0308130641.1bd5769b@posting.google. com>...
    > > [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message
    news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    > > > Or just do :
    > > > # tar cvf tarfile.tar !{filetoexclude}
    > > >
    > > > Ben
    > >
    > > tar: !test.exclude.file: A file or directory in the path name does not
    > > exist.
    > >
    > > Why did you think that would work? You must be using some version of
    > > tar that I don't have...
    > >
    > > -dwiv (CATE/AIX)
    >
    > Strangely enough I didn't just sit and think it would work, I KNOW it
    works
    > as I use it every day on both Solaris and AIX. See below :
    >
    > # tar cvf tarfile.tar !(file1)
    > a file2 0K
    > # tar tvf tarfile.tar
    > tar: blocksize = 3
    > -rw-r--r-- 0/1 0 Aug 15 15:20 2003 file2
    Its a shell expansion and NOT a tar option.
    So !(a) will be expanded by the shell and then passed to tar. I do not know
    if every shell support the "!(FILE)" expansion

    Example
    (0)ffzn0xf3:/tmp/x 372$ set -x

    (0)ffzn0xf3:/tmp/x 372$ ls
    + ls
    a b c d

    ffzn0xf3:/tmp/x 371$ echo !(a)
    + echo b c d
    b c d

    HTH
    Hajo
    CATE AIX/RS6000


    Hans-Joachim Ehlers Guest

  9. #9

    Default Re: how can I exclude file in tar file

    "Hans-Joachim Ehlers" <service@metamodul.com> wrote in message news:<bhiukk$ga82@news-1.bank.dresdner.net>...
    > Its a shell expansion and NOT a tar option.
    Ah! That makes more sense... and, the original example used curly
    braces, so I didn't catch on.

    That works in KSH.
    > So !(a) will be expanded by the shell and then passed to tar. I do not know
    > if every shell support the "!(FILE)" expansion
    >
    > Example
    > (0)ffzn0xf3:/tmp/x 372$ set -x
    >
    > (0)ffzn0xf3:/tmp/x 372$ ls
    > + ls
    > a b c d
    >
    > ffzn0xf3:/tmp/x 371$ echo !(a)
    > + echo b c d
    > b c d
    Yup...test works just as described, using KSH on AIX.

    Thanks for clearing that up! There are significant differences with {
    and (, you see... :)

    -dwiv (CATE/AIX)
    Dwivian Guest

  10. #10

    Default Re: how can I exclude file in tar file

    [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308150625.63ae2569@posting.google. com>...
    > [email]dwivian@earthlink.net[/email] (Dwivian) wrote in message news:<b5cff289.0308130641.1bd5769b@posting.google. com>...
    > > [email]ben.jackson@aah.co.uk[/email] (Ben Jackson) wrote in message news:<d06d98e2.0308130120.344b828a@posting.google. com>...
    > > > Or just do :
    > > > # tar cvf tarfile.tar !{filetoexclude}
    > > >
    > > > Ben
    > >
    > > tar: !test.exclude.file: A file or directory in the path name does not
    > > exist.
    > >
    > > Why did you think that would work? You must be using some version of
    > > tar that I don't have...
    > >
    > > -dwiv (CATE/AIX)
    >
    > Strangely enough I didn't just sit and think it would work, I KNOW it works
    > as I use it every day on both Solaris and AIX. See below :
    >
    > # tar cvf tarfile.tar !(file1)
    > a file2 0K
    > # tar tvf tarfile.tar
    > tar: blocksize = 3
    > -rw-r--r-- 0/1 0 Aug 15 15:20 2003 file2
    >
    > Ben

    Wow about a month ago I was looking for this very option. Thank you
    for sharing the knowledge. I am curious however, will this work for
    directories as well? And, what if you wanted to exclude multiple
    files is there a particular syntax?

    KB
    K. B. Guest

Similar Threads

  1. problem in binding xml file data to datagrid xml file isgenerated through JSP file
    By ckshah in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: May 26th, 03:55 PM
  2. File Viewer / Bloated file sizes / What is the best file format?
    By Martin_Folley@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 1
    Last Post: June 27th, 05:24 PM
  3. rsync exclude file - directory name without directory contents
    By emilio lazardo in forum Linux / Unix Administration
    Replies: 0
    Last Post: December 3rd, 10:28 PM
  4. Replies: 7
    Last Post: November 27th, 04:52 PM
  5. howto use c# regular expression validator to exclude file types
    By Brian Vallelunga in forum ASP.NET General
    Replies: 2
    Last Post: July 31st, 10:27 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