Click to See Complete Forum and Search --> : change permissions on whole dir. muliple files


J-Tek
01-23-2002, 12:59 AM
Hi,

how do you change the permissions on everything w/ in a directory? can you glob?


thanx,

bdl
01-23-2002, 01:05 AM
Hmmm, well you can change the perms on an entire directory in one fell swoop by using the '-R' switch like so

chmod -R 0775 dirname

That will change the directory and its contents to rwx-rwx-r_x. You can also just use globbing like

chmod 0775 *

or

chmod 0775 *.html

or

chmod 0775 .[a-zA-Z]*

for 'dotfiles'.

Is that what you're looking for?

vee-eye
01-23-2002, 01:06 AM
chmod -R u+x /foo

the -R switch recursively changes the permissions of all files within a directory. This will give the owner (user) execution permission of all files and directories within /foo.

Blast it! I never post in time... :)

[ 23 January 2002: Message edited by: vee-eye ]

bdl
01-23-2002, 01:46 AM
LOL...ya see, when you were wasting those precious seconds putting stuff in bold...I had ya!!

:D

J-Tek
01-23-2002, 06:30 PM
That's exactly what I needed.

thanx,