4 ms·
I set permissions on something just infrequently enough that I dont have that as muscle memory, and often I need to match permissions on something already there
by Aloha 5y ago
I set permissions on something just infrequently enough that I dont have that as muscle memory, and often I need to match permissions on something already there, so I'm trying to go "uhhh, its, rwxr-xr-x what does that translate to again?"
Also, frankly, the computer is a calculator, why not have it act as the calculator for me, and tell me what the permissions already are, I can read the octal permissions and know what they mean.
- poewrljaf 5y agochmod --reference=file_with_permissions_i_want.txt file_whose_permissions_i_want_To_change.txt
- Aloha 5y agoyou learn something new every day!
- BenjiWiebe 5y agoYou can also just type --ref.
- mixmastamyk 5y agoThat’s what GUIs are for, this exact use case. The sibling with the reference param is a great option as well, if you can remember it.
- deleted 5y ago[deleted]
- BenjiWiebe 5y agoMy chmod usage generally looks like this: chmod a-rwx,u+rw,g+r,o+r filename a/u/g/o is all, user, group, other. - removes, + adds. r/w/x is read, write, execute (of course).
- randomswede 5y agoThey're bits, in groups of three. rwxr-xrwx would be "111, 101, 111", so 7, 5, 7. I may be odd, but I don't find reading "small numbers" in binary to be much harder than reading "small numbers" in decimal, or hex. Up to about 15-or-so... Maybe as far as 31. But get to six bits, and it's time to actually start doing multiplications and additions, for me.