Skip to main content
added 193 characters in body
Source Link
pgoetz
  • 762
  • 9
  • 18

I always get burned when I try using .* for anything and long ago switched to using character classes:

chown -R username.groupname .[A-Za-z]*

is how I would have done this.

Edit: someone pointed out that this doesn't get, for example dot files such as ._Library. The catch all character class to use would be

chown -R username.groupname .[A-Za-z0-9_-]*

I always get burned when I try using .* for anything and long ago switched to using character classes:

chown -R username.groupname .[A-Za-z]*

is how I would have done this.

I always get burned when I try using .* for anything and long ago switched to using character classes:

chown -R username.groupname .[A-Za-z]*

is how I would have done this.

Edit: someone pointed out that this doesn't get, for example dot files such as ._Library. The catch all character class to use would be

chown -R username.groupname .[A-Za-z0-9_-]*
Source Link
pgoetz
  • 762
  • 9
  • 18

I always get burned when I try using .* for anything and long ago switched to using character classes:

chown -R username.groupname .[A-Za-z]*

is how I would have done this.