View Single Post
Old 01-19-2003, 05:39 PM  
darkone
Disabled
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Actually this is not the best solution for the purpose.

Somewhat better solution is to search for first ':' character - as user/group names cannot contain spaces in unix (':' is used as seperator in group & passwd files) & start decoding string.
Previous method only works for files/directories that are from current year. If decoding fails (files is too old - does not contain HH:MM), you can use less accurate method like: looking for first 4chars long figure, which has digit or 2chars long figure between 1 & 31 on its' left side.. and so on.

Note that there is no way to get accurate user/group name from line such as:
drwx------ 5 usernam e g ro upname 4096 Jan 13 16:41 roeltje

Ps. admins that use spaces in usernames should be punished (There is usually description field that you can use for real name)
darkone is offline