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

backing up hidden files

I've been trying to find a clever way to back up or copy hidden files such as .emacs, .xinitrc, and so on, along with my other data files. The problem is that tar and cp ignore hidden files if you use * as a wildcard. And if you try something like this:

   bob@sonic:~/temp$ tar -cvf target.tar * .?*

tar will "walk upwards" to the root directory thanks to the dual function of "." (for hiding files, and for representing the current directory).

I've found some Mickey Mouse solutions, but nothing very elegant, and I was wondering if anybody has a clever way to do this.

 - Robert

Reply to: