How to use the .* wildcard in bash but exclude the parent directory (..)?

Posted by Allan on Stack Overflow See other posts from Stack Overflow or by Allan
Published on 2010-05-26T04:24:01Z Indexed on 2010/05/26 4:31 UTC
Read the original article Hit count: 236

Filed under:
|

There are often times that I want to execute a command on all files (including hidden files) in a directory. When I try using

chmod g+w * .*

it changes the permissions on all the files I want (in the directory) and all the files in the parent directory (that I want left alone).

Is there a wildcard that does the right thing or do I need to start using find?

© Stack Overflow or respective owner

Related posts about bash

Related posts about wildcard