Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  1. create a file
  2. change its permissions at a specific time
  3. change the permission.

At the moment this is what I have and it changes the permissions of the file but not according to the time specified.

$ at 13:05 
chmod 777 bin/
share|improve this question

migrated from Apr 7 '11 at 4:26

This question came from our site for professional and enthusiast programmers.

1. Please break your description into sentences. 2. Please post your first attempt at writing this script. 3. Please include any problems you're having. – S.Lott Apr 6 '11 at 21:58
up vote 3 down vote accepted

If you want to make a file executable at 3pm, you can do:

echo chmod 777 /path/to/file | at 3pm

The at command takes a script on its standard input. So you echo the command you want to run into at and tell at when to run it.

share|improve this answer

You can use crontab

crontab -e

And write:

05 13 * * * chmod 0777 /full/path/to/bin/

supposing you want it to be executed everyday at 13:05. Finally, save the file.

NOTE: The default editor seems to be "vi", if you are not comfortable with this you can change it before executing "crontab -e" with:

export EDITOR=nano

for example.

share|improve this answer
Heh, I highly doubt that emacs will be easier to use than vim. Maybe nano would be a better choice? – Wuffers Apr 7 '11 at 21:32
I agree, edited now. – kmels Apr 7 '11 at 22:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .