Re: backup and hidden files in tar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



J.L. Coenders wrote:
Hi,
How do I include backup and hidden files in my tar archives? I want a
complete backup of my home directory, including all settings.

do the backup relative to the current directory. go to the directory in question and:


  $ tar cvf mybackup.tar .    (not "*", but ".")

that will pick up everything, including hidden thingies that start with "." in the current directory.

one warning, though. if you do this, the contents of the archive will appear, not as:

  file
  file
  file

but as:

  ./file
  ./file
  ./file

and you have to extract them that way as well. GNU tar is stupidly literal, and if you ask for "file" instead of "./file", it will go "huh?".

rday



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux