ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
10.6 The stat and lstat FunctionsWhile these file tests are fine for testing various attributes regarding a particular file or filehandle, they don't tell the whole story. For example, there's no file test that returns the number of links to a file. To get at the remaining information about a file, merely call the The operand to ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev, $size,$atime,$mtime,$ctime,$blksize,$blocks) = stat(...)
The names here refer to the parts of the stat structure, described in detail in your stat (2) manpage. You should probably look there for the detailed descriptions. For example, to get the user ID and the group ID of the password file, let's try: ($uid, $gid) = (stat("/etc/passwd"))[4,5]; And that's the way it goes. Invoking the Like the file tests, the operand of |