D
I got a quiz question for ya..
To make a file executable for everyone you type,
a) chmod u+x filename
b) chmod all+x filename
c) chmod u+g+o_x filename
d) chmod a+x filename
Thanks for your help.
Anthony
D
Depends entirely on who gets to execute the file.
I usually just use the numbers, it's simpler.
No it dosn't, the question was, how you get it executeable by everyone, it dosn't have anything todo with who gets to do it..Depends entirely on who gets to execute the file.
How ?? the question didn't stated if the group rights should be kept or if it should be changed to only executable, so the numbers are no good here, since they take effect on a global scale, not just the single bit repressenting the execution..I usually just use the numbers, it's simpler.
Erggh...
chmod uses 3 bits x 3 (for owner, group and others - in that order) - the first bit 1 is execute so :
so we can say
bits : 4 2 1
r w x
just add up:
if you want read, write and execute for owner, read and execute for group and only read for others it would be:
chmod 754 filename (remember to do this as owner or root).
but to answer the question, I find:
chmod 111 filename the easiest.
what do I win ?
oh D would also work, but a+x are far from each other on the keyboard so with pratice the bit approce is faster to type
ITS A QUIZ QUESTION , not a debate on which way is better. D is the answer to the question. theres no E: none of the above, use numbers instead choice now is there![]()
Nothing... There is no price attached .... I thought we have a PET for it ... You could have just pointed out to the PET rather than typing it all over again ...what do I win ?
;D
Honestly I only check the PET section when I have a serious problem - so I didn't even notice that we had a PET for this...
Nothing... There is no price attached .... I thought we have a PET for it ... You could have just pointed out to the PET rather than typing it all over again ...
;D
Hell... no prizes... okay... I'll do it for the glory !
There was nothing that said I couldn't write in my own answers :PITS A QUIZ QUESTION , not a debate on which way is better. D is the answer to the question. theres no E: none of the above, use numbers instead choice now is there![]()
Anyway, about the numbers -- I very rarely ever see a situation in which I want to "preserve" the other permissions, while only adding executeable. If I want it executable, it's usually just 755 or 750. Just out of habit, I guess.
Bookmarks