Does Windows have Inode Numbers like Linux?

WindowsLinuxFilesystems

Windows Problem Overview


Does Windows have Inode Numbers like Linux? How does Windows internally manage files?

Windows Solutions


Solution 1 - Windows

The terminology used is a bit different from what you'd find in the Unix world, however in terms of having an integer that uniquely identifies a file, NTFS and some Windows API expose the concept of "file IDs" which is similar.

You can query the file ID of an open handle via http://msdn.microsoft.com/en-us/library/aa364952(v=vs.85).aspx">`GetFileInformationByHandle`</a>;. See nFileIndexHigh, nFileIndexLow; this is the high and low parts respectively of the file ID which is 64 bits.

http://msdn.microsoft.com/en-us/library/bb432380(v=vs.85).aspx">`NtCreateFile`</a> can also open a file by its ID. See the FILE_OPEN_BY_FILE_ID flag. You need a volume handle to open by file ID.

Solution 2 - Windows

Yes it does. Generally called fileID. Try this in a Win8 command shell:

fsutil file queryfileid  <filename>

Solution 3 - Windows

Yes. NTFS uses a B-Tree indexing system. Every file in the MFT has a 64 bit File Index Number. This number, called the File ID, uniquely identifies the file ONLY WITHIN ITS VOLUME. I.e., two files on two separate volumes on the same PC may have the same File ID. See this MSDN article for more details.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa363788(v=vs.85).aspx

regarding your second question, "how does windows internally manage files", see this technet article:

https://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx

Solution 4 - Windows

There are two things here. The term INode, and a file-system implementation that uses either INode terminology or something like INode in its place.

All Windows file-systems(FAT*,NTFS) I know of, use Inode-like structures in actual implementation.

To further simplify the answer

(Think of INode as a block of metadata about a file.)

INode as term : No windows file system dont have it.

INode as concept : Windows will have some other structures, similar in property and usage but used with different name

Solution 5 - Windows

This question is more about filesystems than a particular OS I believe. Each filesystem handles files differently (and each OS can support multiple filesystems).

http://pcnineoneone.com/howto/filesystems1/ has a pretty good writeup on FAT and NTFS, which are two popular filesystems with windows.

Solution 6 - Windows

No. There is no equivalent to inodes in NTFS. Inode is with **IX based file systems.

But yes, NTFS stores a unique 8-byte reference number for each file.

Comment if you want to know more details.

Solution 7 - Windows

Inodes are a POSIX concept. Modern Windows versions use NTFS. An in-depth description of NTFS: Inside NTFS

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGautam BhallaView Question on Stackoverflow
Solution 1 - WindowsasveikauView Answer on Stackoverflow
Solution 2 - WindowsBuaiView Answer on Stackoverflow
Solution 3 - WindowsAndrew HowlettView Answer on Stackoverflow
Solution 4 - WindowsAjeet GangaView Answer on Stackoverflow
Solution 5 - WindowsRontologistView Answer on Stackoverflow
Solution 6 - WindowsGautam BhallaView Answer on Stackoverflow
Solution 7 - WindowsNemanja TrifunovicView Answer on Stackoverflow