Results 1 to 2 of 2

Thread: Installing on a new computer - tar invisible files

  1. #1
    Join Date
    Jul 2007
    Location
    Seattle
    Beans
    13

    Installing on a new computer - tar invisible files

    Just installed the newest release on another computer and want to copy all the . files from my home directory to home on my new computer. I could not figure out the tar command to do only that. Any hints?

    Also, is it safe to do this?

  2. #2
    Join Date
    Aug 2005
    Beans
    367

    Re: Installing on a new computer - tar invisible files

    Yes, for the most part it's safe. I usually stay away from the '.gnome*' folders and a few of the others that are more core OS than app-specific. If you're unsure, make a backup of your current home directory first, so that you can restore it if something goes wrong (and then be more selective when copying config information the second time)

    You can use something like this to give you a list of all the files in your home directory:

    Code:
    ls -a | perl -pe 's/\n/ /g' | less
    Just edit the list to remove what you don't want (such as '.' and '..'), then plug the list into your tar command:

    Code:
    tar -czvf home.tar.gz <list>
    alternately, zip everything up individually and copy them one by one:

    Code:
    ls -a | while read line;do echo tar -czvf $line.tar.gz $line;done

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
  •