Why do inode number start from 1 and not 0 ?
Answers were Sorted based on User's Feedback
Answer / satish
1) All block and inode addresses start at 1. The first
block on the disk is block 1. 0 is used to indicate no
block.
2)0 is used as a sentinel value to indicate null or no
inode. similar to how pointers can be NULL in C. without a
sentinel, you'd need an extra bit to test if an inode in a
struct was set or not.
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / virupakshicm
0 indicates no inode. We know that directory contains data
in the form of entries and each entry contains inode number
and filename. Suppose if we delete a particular file from
the directory, then that entries inode number will be
changed to 0, indicating that this particular entry is
free. So when the next file is created under the directory,
then the kernel uses this entry for the new file and it
also changes the filename component to new name. This is
reason why inode 0 is not used.
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / khaja
BECAUZ INODE HAS DISK BLOCKS WHICH START FROM 0 ie: inode
is 1.
| Is This Answer Correct ? | 4 Yes | 7 No |
What is the difference between a soft link and a hard link?
What is the difference between > and >> operators?
What is a filesystem?
How to find the version details of unix? if any application is installed in unix OS how to find the version of that application is it possilbe or not? pls let me know cmd in detail.
Am using Mac OS 10.4.11 on an Imac (PPC) Internal hard disk got named disk0s3 and will not mount. What commands can be used in TERMINAL to rename the internal hard disk to C96?
how to set request time out value for name resolution on clients (hp-ux) ?
how to check GDE,EME,Java,Oracle9i Enterprise Edition Release versions Versions on unix system
What does the ?route? command do?
What is paging?
fork()?
How does the inode map to data block of a file?
Have you used VI editor?