question about a unix command

Omegachi

Diamond Member
Mar 27, 2001
3,922
0
76
how can you tell if a file in unix is writable.

and when i use ls -l what does the drwx-rw-... stuff mean?
 

macka

Senior member
Apr 30, 2001
262
0
0
??? just open it and try to edit the file...???
<--- doesn't know unix too good
 

jobberd

Banned
Mar 30, 2001
2,057
0
0
answer #1 lies in answer #2. drwxrwxrwx tells you the parameters set on the specific file. d says its a directory, r means its readable, w means its writable, and x means its executable. the first three spaces are for the owner of the file, the next three are for the group that the owner is in, and the last three are for any other users

edit: thanks notfred
 

Omegachi

Diamond Member
Mar 27, 2001
3,922
0
76
i can't do that, the command ls -l is suppose to show if the file is writable, but i can't determine how you can tell if that is possible
 

notfred

Lifer
Feb 12, 2001
38,241
4
0


<< answer #1 lies in answer #2. drwxrwxrwx tells you the parameters set on the specific file. d says its a directory, r means its readable, w means its writable, and x means its executable. the first three spaces are for the creator of the file, the next three are for the group that the creator is in, and the last three are for any other users >>



"creator of the file" should be "owner of the file"
 

im2smrt4u

Golden Member
Jul 14, 2001
1,912
0
0


<< "creator of the file" should be "owner of the file" >>



The best way to think of it is U.G.O. U=User, G=Group, O=Other.