small shell script for Linux users

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Postby tZork » Fri Apr 07, 2006 9:08 am

the numeric chomd's are grt for speedy typing, but kinda hard to remeber sometimes. there is an alternate way of setting rights, literal.

for example if you whant exec, read and write group meneber read and other nada you would do "chmod u=rwx,g=r mycoolscript.sh"

Specing "who"
u = user
g = group
o = other
a = all (same as ugo)

Specing "what"
r = read
w = write
x = exec

the "who" part can be combined just like the "what" part. ex:
"chmod ug=rw,o=r"

some examples

chmod 777 is chmod a=rwx
chmod 700 is chmod u=rwx
chmod 744 is chmod u=rwx,go=r
HOF:
<Diablo> the nex is a "game modification"
<Diablo> quake1 never had a weapon like that.
<Vordreller> there was no need for anything over 4GB untill Vista came along
<Samua>]Idea: Fix it? :D
<Samua>Lies, that only applies to other people.
tZork
tZite Admin
 
Posts: 1337
Joined: Tue Feb 28, 2006 6:16 pm
Location: Halfway to somwhere else

Postby divVerent » Fri Apr 07, 2006 12:56 pm

tZork wrote:the numeric chomd's are grt for speedy typing, but kinda hard to remeber sometimes. there is an alternate way of setting rights, literal.


Well, that's why I only mentioned the combinations of octal rights that actually make sense... many combinations don't.

some examples

chmod 777 is chmod a=rwx
chmod 700 is chmod u=rwx
chmod 744 is chmod u=rwx,go=r


The most useful part about this syntax is that you can also MODIFY rights:

chmod a+r *.c # make everyone be able to read the .c files

Or even:

chmod -R a=rX,u+w .

The latter makes this directory and below 755, all things that already were executable 755, and all other regular files 644.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby esteel » Fri Apr 07, 2006 5:57 pm

KadaverJack wrote:I would prefer an "Autorecord On/Off" switch in the menu instead of a shell script. A good place for it would be in the join menu, next to the refresh button imho.

I like both options. To have it in some batch file does not change anything for me.. its harder to forget and as i mostly use ST-2 as server browser i see the join menu not very often :)
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Previous

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest