Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to change the file permissions for the entire directory. Presently all the files in the dir have the following permission,

-rw-------

And I wish to change it to,

-rw-r--r--

I know I need to use chmod but since I need to change it for the entire dir, is there a command that will change the permissions for the entire dir in a single go?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I'm assuming you mean the files in the entire directory. In that case, use a wildcard (*) to apply it to all files:

chmod go+r *

or

chmod 644 *

Both do the same thing.

EDIT: As has been said in the comments, you need to do chmod 755 SampleOutputs/ to have execute permissions on the container folder itself (to be able to cd into it). However, I'd leave out the -R option because it will make all the files inside the folder executable, as well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.