![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to stat X-Server on AIX 5.3 ??? | touny | AIX | 5 | 11-20-2007 07:29 AM |
| Hi errno in sys/stat.h | vijlak | High Level Programming | 6 | 11-11-2006 09:13 PM |
| Cannot Stat Error | Homer Allman | UNIX for Advanced & Expert Users | 1 | 05-22-2006 10:07 AM |
| Cannot stat? | lgardner | UNIX for Dummies Questions & Answers | 1 | 05-27-2005 04:05 PM |
| stat() fails!!! what can i do? | solvman | High Level Programming | 3 | 02-06-2002 05:17 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
stat
the output of stat command is
Size: 238 Blocks: 8 IO Block: 4096 regular file Device: 80ah/2058d Inode: 736783 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ gajju) Gid: ( 500/ gajju) Access: 2008-09-08 20:00:15.000000000 +0530 Modify: 2008-09-08 20:01:42.000000000 +0530 Change: 2008-09-08 20:01:42.000000000 +0530 wat is the significance of BLOCKS and IO BLOCK here? |
|
||||
|
stat
Quote:
even if size of file is less than 16 block but greater than 8 blocks? and why do we need block for allocation? |
|
|||||
|
Once you fully use the first 4096 block, yes you will get a 2nd. The filesystem works in blocks for efficiency. Metadata is needed to remember which block is assigned to which file. If the block size was 1 byte, more than half of the filesystem would be needed for meta-data. Also writing one byte at a time would take too long. So it reads and writes data in large blocks and buffers it to reduce the amount of physical I/O.
|
|
||||
|
Quote:
but i would like to know one more thing that why do we need 2 kind of blocks one block of size 512 bytes & another if I/o BLOCK of 4096 bytes. wat is the use of first kind of block? |
|
|||||
|
The 512 is only to report the size in a standard format. When you see that a file is using 8 blocks, that means the same thing on all versions of unix. 512 was chosen because some old versions of unix really used a blocksize of 512.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|