Bonjour,

On 2012-01-21 23:19:29 +0100, [email protected] wrote:
> Comment modifier les propriétaires (nom et groupe) des fichiers cachés
> (commençant par un point) ?
> 
> Si je fais :
> # chown  -Rf   andre:andre   /home/andre/.*
> c'est le répertoire inférieur "/home" qui se voit modifier
> les droits par "andre andre",
> ainsi que ceux des autres répertoires des autres users.

C'est parce qu'en sh POSIX .* matche "." et "..".
Solution: utiliser zsh!

  FILENAME GENERATION
[...]
    In filename generation, the character `/' must be matched
    explicitly; also, a `.' must be matched explicitly at the
    beginning of a pattern or after a `/', unless the GLOB_DOTS
    option is set. No filename generation pattern matches the
    files `.' or `..'. In other instances of pattern matching,
    the `/' and `.' are not treated specially.

-- 
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/fr/FrenchLists

Pour vous DESABONNER, envoyez un message avec comme objet "unsubscribe"
vers [email protected]
En cas de soucis, contactez EN ANGLAIS [email protected]
Archive: http://lists.debian.org/[email protected]

Répondre à