OT (ish): How to copy hidden files/directories
Don Buchholz
buchholz at easystreet.com
Mon Oct 11 16:43:38 UTC 2004
Robert P. J. Day wrote:
> On Sun, 10 Oct 2004, Don Buchholz wrote:
>
>> I just subscribed this morning, so I didn't see
>> that post. The solution you posted
>>
>> $ cp -r * .[!.]* <destdir>
>>
>> does solve that problem.
>>
>> To be totally pedantic, though, ".[!.]*" won't match a file named
>> "..foofoo". So, for completeness, we need two patterns:
>>
>> $ cp -pr .[!.]* ..?* <destdir>
>
>
> dang, i had never considered that before. colour me sheepish.
Well, in ~15 years of *nix, I've never had a problem with ".??*",
so your post got me thinking a little harder about corner cases. ;-)
- Don
More information about the fedora-list
mailing list