How to make all new files in a directory executable

9,038

You can change permission of a directory using the following command
chmod -R 700 directory

where -R ----> recursively apply permission all sub-directories and files under directory

Share:
9,038

Related videos on Youtube

Hashken
Author by

Hashken

Updated on September 18, 2022

Comments

  • Hashken
    Hashken over 1 year

    I want a way by which whenever I create a new file in a particular directory, I want it to be executable by default.

    Is this even possible, if so how?

  • Rinzwind
    Rinzwind over 10 years
    That is not what he wants. He wants it automatic.
  • m. öztürk
    m. öztürk over 10 years
    Ok, completed my answer.
  • Kevin
    Kevin almost 9 years
    By my understanding, this will mark all existing files as executable, but any new files written after running this will not be.