[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] how to touch an executiable file
From: |
Bob Proulx |
Subject: |
Re: [Help-bash] how to touch an executiable file |
Date: |
Sat, 31 Dec 2011 11:21:19 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
lina wrote:
> Eric Blake wrote:
> > lina wrote:
> > > is there one command can be used to be equal to
> > > touch a.sh
> > > chmod 755 a.sh
> >
> > No. But why do you think you need a single command? What reason do you
> > have for wanting to do this atomically instead of in two parts?
>
> touch is the only command I know to create a new file, but right now
> I checked the "touch" function is mainly to change the time.
>
> so I wonder are there some command to create a file which I don't
> know, or which can also set the character of a file.
It is better to have a rich toolbox of simple commands rather than a
cluttered toolbox of complex commands.
Create the file and then set the permissions just as you are doing.
That is the best way.
Bob