Re: backing up hidden files
On Thu, 27 Feb 2003 23:24:50 Robert Storey wrote:
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.
You could try using .[a-zA-Z]* rather than .?*