OT (ish): How to copy hidden files/directories

Robert P. J. Day rpjday at mindspring.com
Sun Oct 10 19:15:31 UTC 2004


On Sun, 10 Oct 2004, Don Buchholz wrote:

> To move only hidden (dot-) files/folders to another directory...
>
>   # cp -pr .??* newdir
>
> Why use ".??*" ...
>  * the initial "." indicates a 'hidden' file (or dot-file in Unix parlance)
>  * the "??" match at least two characters ... this keeps the pattern from
>    matching ".." which is the parent-directory
>  * the "*" match any number (from zero to a-lot!) of characters

which, as i pointed out earlier, won't pick up a file named ".a".

rday




More information about the fedora-list mailing list