how to create a file and make it executable in one command?
how to create a file and make it executable in one command?
I am tired of creating a file with nano, saving it and then making it executable. Is there a command that makes it in one step?
You're viewing a single thread.
All comments
15
comments
You want the install command.
At least, I think this will do it. I haven’t used it in a while.
17 0 Replytouch file && chmod +x file
is good but this here is the one true command for the purpose.6 0 Replyinstall -m755 /dev/null target
was the first thing I thought of. I would never use this but it is a single command.2 0 ReplyWhy would you never use it?
1 0 ReplyI'm going to write (at least part of) the script first anyway, and then I can just use chmod +x after the file is saved which is shorter.
1 0 Reply
15
comments
Scroll to top