Re: moving /home [Solved - Corrected HowTo]

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

 



On Thu, 2005-12-08 at 08:02 +0000, James Wilkinson wrote:
> Jeff Vian wrote:
> > # cp -a /home/* /home/.[!.]* <dest/directory>
> > In this command it explicitly asks for anything beginning with a '.',
> > but since both '.' and '..' match they need to be excluded, thus the
> > [!.] (not dot) part. For clarity read up on regexps.
> 
> Um. This isn't technically a regexp but a shell glob expression. They
> work differently ("." means any character in a regexp, and "*" means any
> number of the previous character).
> 
> Getting a glob expression to mean *everything* by . and .. is a Known
> Tricky Problem. One that bash has sorted with shopt -s dotglob .
> 
Yeah, I often use such things, and it is tricky to understand when it is
a glob and when it is a regexp.  Thanks for catching that for me.

> See
> https://www.redhat.com/archives/fedora-list/2004-July/msg05222.html
> 
> Hope this helps,
> 
> James.
> 
> -- 
> E-mail address: james | "Does exactly what it says on the tin." ...
> @westexe.demon.co.uk  | I've got a tin at home: it says "Open other end".
>                       | It never is.
>                       | -- Humphrey Lyttelton, "I'm Sorry, I Haven't A Clue"
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux