Re: chmod hidden files
- From: Bit Twister <BitTwister@xxxxxxxxxxxxxxxx>
- Date: Mon, 15 May 2006 19:37:02 -0500
On Mon, 15 May 2006 20:02:56 -0400, Mercury wrote:
Well, I'm trying to use * as the wildcard, but this doesn't get the hidden
files.
chmod -R XXX *
where XXX are the permissions.
That doesn't do what I want (doesn't chmod the hidden files) - what will?
Hmmm, here is what I have
/home/bittwister/tmp/junk
/home/bittwister/tmp/junk/l1
/home/bittwister/tmp/junk/l1/l2
$ ls -al l1/l2/.a*
-rwxrwxr-x 1 bittwister bittwister 0 May 15 12:24 l1/l2/.aaa
-rw-r--r-- 1 bittwister bittwister 0 May 15 13:00 l1/l2/.aab
$ chmod -R 775 *
ls -al l1/l2/.a*
-rwxrwxr-x 1 bittwister bittwister 0 May 15 12:24 l1/l2/.aaa
-rwxrwxr-x 1 bittwister bittwister 0 May 15 13:00 l1/l2/.aab
$ chmod -R 777 *
ls -al l1/l2/.a*
-rwxrwxrwx 1 bittwister bittwister 0 May 15 12:24 l1/l2/.aaa
-rwxrwxrwx 1 bittwister bittwister 0 May 15 13:00 l1/l2/.aab
What can also be happing is you are removing/changing privs on directories
which prevents changes below that directory.
For current directory you can do
chmod xxx * .*
and/or
chmod xxx * .* */* */.* */*/* */*/.*
Anytime you what to see what happens with command line expansion, do a
ls -al (your string here) Example:
ls -al * .* */* */.* */*/* */*/.*
If you do not want to change directory perms you will need to use
find. If filenames contain any white space characters you may want to
use something like
find . -type f -name "*" -print0 | xargs -r0 chmod 755
For extra points, read
man find
man xargs
.
- Follow-Ups:
- Re: chmod hidden files
- From: Dave Uhring
- Re: chmod hidden files
- References:
- chmod hidden files
- From: Mercury
- Re: chmod hidden files
- From: Mercury
- Re: chmod hidden files
- From: Bit Twister
- Re: chmod hidden files
- From: Mercury
- chmod hidden files
- Prev by Date: Re: chmod hidden files
- Next by Date: Re: chmod hidden files
- Previous by thread: Re: chmod hidden files
- Next by thread: Re: chmod hidden files
- Index(es):
Relevant Pages
|