From: Peter Loftus Date: 2007-11-26T06:29:04+09:00 Subject: Has anyone used File.stat to check permissions In ruby API there is an example s = File.stat("testfile") sprintf("%o", s.mode) #=> "100644" I need to check the last three numbers from the octal notation which is "644" which means: rw- for user r-- for group r-- for other Does anyone know how i could check just those three numbers and leave the rest Regards Loftz -- Posted via http://www.ruby-forum.com/.