command to copy hidden files?

Todd Zullinger tmz at pobox.com
Tue Jan 23 03:06:28 UTC 2007


Dave Stevens wrote:
> I've tried to copy files from my home folder to do a disk upgrade. I
> foolishly only copied the visible (non-dot) files. Now I'd like to
> copy only the . files (recursively) but don't see what the syntax
> is. Anyone?

Do you mean that you have dot files in subdirectories that didn't get
copied and now you want to copy them?  Or that you want to copy the
dot files in the top level of your home dir recursively?

For the latter, try the pattern:

.[^.]*

This works out to anything that starts with a dot, followed by
anything that isn't a dot (to avoid matching the parent directory ..)

For the former, perhaps the find command would be good?  The same
pattern can be used as an argument to the -name option (.[^.]*).

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
Liberty is always dangerous, but it is the safest thing we have.
    -- Harry Emerson Fosdick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20070122/8de2cdc5/attachment-0002.bin 


More information about the users mailing list