Results 1 to 3 of 3

Thread: -u switch in tar

  1. #1
    Join Date
    Apr 2008
    Location
    224.0.0.5
    Beans
    372
    Distro
    Ubuntu 12.04 Precise Pangolin

    -u switch in tar

    Folks:
    I am having a difficult time with the "-u" switch for "tar". I want to only append files that have changes in a directory, not re-tar every file in the directory.

    I know the -u switch is used for this, but how do I use this switch? When I use "-cvfu" I get another archive labeled "u", so I am not sure what is going on, and I'm not sure what I am doing wrong.
    Arrakis

  2. #2
    Join Date
    Jul 2009
    Location
    London
    Beans
    1,480
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: -u switch in tar

    the problem is that the 'f' parameter needs to be followed by the name of the archive you are creating. just reorder your parameters to put 'f' last.

  3. #3
    Join Date
    Apr 2008
    Location
    224.0.0.5
    Beans
    372
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: -u switch in tar

    Quote Originally Posted by DaithiF View Post
    the problem is that the 'f' parameter needs to be followed by the name of the archive you are creating. just reorder your parameters to put 'f' last.
    hey thanks for the help. I ended up having to use the following command.

    "tar -vuf", which updated the tar archive with only the modified and added content.

    thanks mate...
    Arrakis

Tags for this Thread

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
  •