On Fri, 11 Mar 2011 15:03:14 +1300 newbie01 perl <newbie01.p...@gmail.com> wrote:
> Hi, > > Does anyone know of any permission bit "translator"? One that can > translate the permission bit from its textual value to its octal value > and vice versa. It is alright if it is always just rwx but on a lot of > occasions nowadays, getting a lots of s, S, t, etc. > > -rwxrwxrwx 1 oracle dba 0 Mar 11 13:27 > x ==> 777 -rwxr-x--- 1 oracle dba 0 Mar > 11 13:27 y ==> 750 -rw-r----- 1 oracle > dba 0 Mar 11 13:27 z ==> 640 > > Sometimes I receive instruction to change the octal value of the > permission and I want to know how it is supposed to look like after > I've done the change so I can verify its ls -l output before and after > the change. > > Any suggestion will be much appreciated. Thanks. > Octal Text Binary Meaning 0 --- 000 All types of access are denied 1 --x 001 Execute access is allowed only 2 -w- 010 Write access is allowed only 3 -wx 011 Write and execute access are allowed 4 r-- 100 Read access is allowed only 5 r-x 101 Read and execute access are allowed 6 rw- 110 Read and write access are allowed 7 rwx 111 Everything is allowed hth Jim -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/