Find the answer to your Linux question:
Results 1 to 5 of 5
Objective: restore all /home files and directories from an existing full-system tar archive excluding hidden files. The closest I've been able to come is ' tar -xvpf existing.tar --directory=../ ./home ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2014
    Posts
    3

    tar: restore only non-hidden files during a restore of /home


    Objective: restore all /home files and directories from an existing full-system tar archive excluding hidden files.

    The closest I've been able to come is 'tar -xvpf existing.tar --directory=../ ./home

    That command will restore only home/ files and directories, but it will also restore hidden files and directories to /home.

    Does anyone know how to avoid restoring the hidden files and directories to home/?

    TIA
    Last edited by AlanWalker; 05-25-2014 at 09:23 AM.

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    949
    Have you tried adding: --exclude '.*'
    A lion does not lose sleep, over the opinion of sheep.

  3. #3
    Just Joined!
    Join Date
    May 2014
    Posts
    3
    Quote Originally Posted by docbop View Post
    Have you tried adding: --exclude '.*'
    I believe so. I'll get back to you on that.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    949
    In reseaching this the issue mentioned is tar varies a lot from implementation to implementation so probably going to take a lot of experimenting.
    A lion does not lose sleep, over the opinion of sheep.

  6. #5
    Just Joined!
    Join Date
    May 2014
    Posts
    3
    Quote Originally Posted by docbop View Post
    In reseaching this the issue mentioned is tar varies a lot from implementation to implementation so probably going to take a lot of experimenting.
    I know; as I've said elsewhere:

    I've been looking into GNU tar v 1.26 for 20+ hours now (make that 30+); I am slowly locking it into observable behavior and hope to have something to report before the end of next month.

    Of course, that will only be for GNU tar v 1.26; all findings will have to be confirmed for any other variation of the original tar.

Posting Permissions

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