ÉèΪÊ×Ò³ - ¼ÓÈëÊÕ²Ø ASPÕ¾³¤Íø£¨Aspzz.Cn£©- ¿Æ¼¼¡¢½¨Õ¾¡¢¾­Ñé¡¢ÔƼÆËã¡¢5G¡¢´óÊý¾Ý,Õ¾³¤Íø£¡
ÈÈËÑ£º ÊÖ»ú Êý¾Ý ¹«Ë¾
µ±Ç°Î»Ö㺠Ê×Ò³ > ·þÎñÆ÷ > ´î½¨»·¾³ > Windows > ÕýÎÄ

ÔõÑùÀí½âºÍʶ±ðLinuxÖеÄÎļþÀàÐÍ(3)

·¢²¼Ê±¼ä£º2019-04-12 21:40 ËùÊôÀ¸Ä¿£º117 À´Ô´£ºMagesh Maruthamuthu
µ¼¶Á£ºstat ÃüÁîÔÊÐíÎÒÃÇÈ¥²é¿´ÎļþÀàÐÍ»òÎļþϵͳ״̬¡£¸ÃʵÓóÌÐò±È file ÃüÁîÌṩ¸ü¶àµÄÐÅÏ¢¡£ËüÏÔʾÎļþµÄ´óÁ¿ÐÅÏ¢£¬ÀýÈç´óÐ ¢¿é´óÐ ¢IO ¿é´óÐ ¢Inode Öµ¡¢Á´½Ó¡¢ÎļþȨÏÞ¡¢UID¡¢GID¡¢ÎļþµÄ·ÃÎÊ/¸üкÍÐ޸ĵÄʱ¼äµÈ

stat ÃüÁîÔÊÐíÎÒÃÇÈ¥²é¿´ÎļþÀàÐÍ»òÎļþϵͳ״̬¡£¸ÃʵÓóÌÐò±È file ÃüÁîÌṩ¸ü¶àµÄÐÅÏ¢¡£ËüÏÔʾÎļþµÄ´óÁ¿ÐÅÏ¢£¬ÀýÈç´óС¡¢¿é´óС¡¢IO ¿é´óС¡¢Inode Öµ¡¢Á´½Ó¡¢ÎļþȨÏÞ¡¢UID¡¢GID¡¢ÎļþµÄ·ÃÎÊ/¸üкÍÐ޸ĵÄʱ¼äµÈÏêϸÐÅÏ¢¡£

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´ÆÕͨÎļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×ÅÆÕͨÎļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat 2daygeek_access.log
  2. File: 2daygeek_access.log
  3. Size: 14406929 Blocks: 28144 IO Block: 4096 regular file
  4. Device: 10301h/66305d Inode: 1727555 Links: 1
  5. Access: (0644/-rw-r--r--) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
  6. Access: 2019-01-03 14:05:26.430328867 +0530
  7. Modify: 2019-01-03 14:05:26.460328868 +0530
  8. Change: 2019-01-03 14:05:26.460328868 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´Ä¿Â¼Îļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×ÅĿ¼Îļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat Pictures/
  2. File: Pictures/
  3. Size: 4096 Blocks: 8 IO Block: 4096 directory
  4. Device: 10301h/66305d Inode: 1703982 Links: 3
  5. Access: (0755/drwxr-xr-x) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
  6. Access: 2018-11-24 03:22:11.090000828 +0530
  7. Modify: 2019-01-05 18:27:01.546958817 +0530
  8. Change: 2019-01-05 18:27:01.546958817 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´Á´½ÓÎļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×ÅÁ´½ÓÎļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat /dev/log
  2. File: /dev/log -> /run/systemd/journal/dev-log
  3. Size: 28 Blocks: 0 IO Block: 4096 symbolic link
  4. Device: 6h/6d Inode: 278 Links: 1
  5. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
  6. Access: 2019-01-05 16:36:31.033333447 +0530
  7. Modify: 2019-01-05 16:36:30.766666768 +0530
  8. Change: 2019-01-05 16:36:30.766666768 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´×Ö·ûÉ豸Îļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×Å×Ö·ûÉ豸Îļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat /dev/vcsu
  2. File: /dev/vcsu
  3. Size: 0 Blocks: 0 IO Block: 4096 character special file
  4. Device: 6h/6d Inode: 16 Links: 1 Device type: 7,40
  5. Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 5/ tty)
  6. Access: 2019-01-05 16:36:31.056666781 +0530
  7. Modify: 2019-01-05 16:36:31.056666781 +0530
  8. Change: 2019-01-05 16:36:31.056666781 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´¿éÎļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×Å¿éÎļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat /dev/sda1
  2. File: /dev/sda1
  3. Size: 0 Blocks: 0 IO Block: 4096 block special file
  4. Device: 6h/6d Inode: 250 Links: 1 Device type: 8,1
  5. Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 994/ disk)
  6. Access: 2019-01-05 16:36:31.596666806 +0530
  7. Modify: 2019-01-05 16:36:31.596666806 +0530
  8. Change: 2019-01-05 16:36:31.596666806 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´ Socket Îļþ£¿

ÔÚÄãµÄÖն˼òµ¥µØÊäÈë stat ÃüÁî¸ú×Å Socket Îļþ¡£²ÎÔÄÏÂÃæµÄ½á¹û¡£

  1. # stat /var/run/dbus/system_bus_socket
  2. File: /var/run/dbus/system_bus_socket
  3. Size: 0 Blocks: 0 IO Block: 4096 socket
  4. Device: 15h/21d Inode: 576 Links: 1
  5. Access: (0666/srw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
  6. Access: 2019-01-05 16:36:31.823333482 +0530
  7. Modify: 2019-01-05 16:36:31.810000149 +0530
  8. Change: 2019-01-05 16:36:31.810000149 +0530
  9. Birth: -

ÔÚ Linux ÖÐÈçºÎʹÓà stat ÃüÁî²é¿´ÃüÃû¹ÜµÀÎļþ£¿

£¨±à¼­£ºASPÕ¾³¤Íø£©

ÍøÓÑÆÀÂÛ
ÍƼöÎÄÕÂ
    ÈȵãÔĶÁ