PDA

View Full Version : Help with chmod


B00M
12-08-2001, 10:55 PM
Hi,

Does anyone know the command to chmod a whole directory and its subdirectories, files and all.

I thought it was something like this
chmod -R 666 *.*

Thxs,
Jeff

ProgGod
12-08-2001, 11:36 PM
chmod -R a+r .

will set the read bit for everyone in all files and all dirs, starting with the dir you are in.

forget about those numbers, i know most people don't know octal off hand :)

a (all) u (user)
+r read +w write +x execute
chmod a+w file = everyone write permision for file.

ProgGod
12-08-2001, 11:37 PM
btw this isn't dos, its never *.* just *

Energy Hosting
12-09-2001, 01:36 AM
chmod -R 666 *
and/or
chmod 666 -R *

will do what you need.

You can use *.* instead of * if you want to chmod only files and not directories (assuming all your files have .extensions)

ProgGod, you may find this useful. http://etext.lib.virginia.edu/helpsheets/regex.html

ProgGod
12-09-2001, 01:46 AM
Heh why would I find that useful, i know regex :) I didn't ask the question BOOM did.

Energy Hosting
12-09-2001, 01:48 AM
Originally posted by ProgGod:
<STRONG>its never *.* just *</STRONG>

Originally posted by ProgGod:
<STRONG>Heh why would I find that useful</STRONG>

Because it's often *.* or *.html and not * :)

B00M
12-09-2001, 01:53 PM
Thxs Guy,

I worked without the *.*.

Thxs again, you saved me a bunch of work.