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

Re: backup and hidden files in tar



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



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