Questions tagged [ntfs]

NTFS (New Technology File System) is the primary file system used by Windows.

NTFS (New Technology File System) is a proprietary file system developed by Microsoft Corporation for its Windows line of operating systems, beginning with Windows NT 3.1 and Windows 2000, including Windows XP, Windows Server 2003, and all their successors to date.

NTFS supersedes the file system as the preferred file system for Microsoft’s Windows operating systems.

NTFS has several improvements over FAT and HPFS such as improved support for metadata and the use of advanced data structures to improve performance, reliability, and disk space utilization, plus additional extensions such as security access control lists (ACL) and file system journaling.

Versions

The NTFS on-disk format has five released versions:

  • v1.0 with NT 3.1, released mid-1993
  • v1.1 with NT 3.5, released fall 1994
  • v1.2 with NT 3.51 (mid-1995) and NT 4 (mid-1996)
  • v3.0 from Windows 2000 ("NTFS V5.0" or "NTFS5")
  • v3.1 from Windows XP (autumn 2001; "NTFS V5.1")

NTFS Log

NTFS is a journaling file system and uses the NTFS Log ($LogFile) to record metadata changes to the volume. It is a critical functionality of NTFS (a feature that FAT/FAT32 does not provide) for ensuring that its internal complex data structures, or data moves performed by the defragmentation API, the modifications to MFT records, and indices will remain consistent in case of system crashes, and allow easy rollback of uncommitted changes to these critical data structures when the volume is remounted.

NTFS on other operating systems

Linux

The ability to read and write to NTFS is provided by the NTFS-3G driver. It is included in most distributions.

Mac OS X

Mac OS X 10.3 and later include read-only support for NTFS-formatted partitions.

References

961 questions
10
votes
2 answers

(why) is FSCTL_SET_OBJECT_ID dangerous?

NTFS files can have object ids. These ids can be set using FSCTL_SET_OBJECT_ID. However, the msdn article says: Modifying an object identifier can result in the loss of data from portions of a file, up to and including entire volumes of data. But…
simonzack
  • 19,729
  • 13
  • 73
  • 118
10
votes
2 answers

"size on disk" is zero for non-zero file in windows 8?

I found there are some files on my disk, which 1) the real size is not zero, but it is small, around 500 bytes 2) the "size on disk" shows zero when you check its properties 3) if I make the file smaller, the "size on disk" is still 0 4) if I make…
Ming Dong
  • 199
  • 2
  • 6
10
votes
1 answer

Sharing git repo on NTFS partition between Linux/Windows dualboot

I'm developing an (Qt) application which should run under Windows and Linux. So, I want to be able to develop under Windows and Linux, too. Therefore I have stored my project (as git repo) on a NTFS partition which I mount under Linux (Ubuntu…
avb
  • 1,701
  • 5
  • 22
  • 37
10
votes
1 answer

How do I determine the degree in which a file is fragmented?

I would like to provide a way to recognize when a large file is fragmented to a certain extent, and alert the user when they should perform a defragmentation. In addition, I'd like to show them a visual display demonstrating how the file is actually…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
9
votes
1 answer

Setting NTFS permissions in C#.NET

How do I set NTFS permissions in C#.NET? I am trying to change permissions for read/write in .NET. I'm a newbie, please assist!
Nil B
  • 195
  • 2
  • 9
9
votes
4 answers

Any way to work around the PathTooLongException that FileSystemInfo.Fullname throws sometimes?

I have files on my hard drive that throw a PathTooLongException when I access the Fullname property of a FileSystemInfo object. Is there any way around this (excluding renaming the files which is not an…
Ian Mercer
  • 38,490
  • 8
  • 97
  • 133
9
votes
4 answers

PowerShell Remove-Item not waiting

If have this piece of code if(Test-Path -Path $OUT) { Remove-Item $OUT -Recurse } New-Item -ItemType directory -Path $OUT Sometimes it works, but sometimes the New-Item line produces a PermissionDenied ItemExistsUnauthorizedAccessError…
armenm
  • 922
  • 6
  • 9
9
votes
2 answers

Taking ownership of files with 'broken' permissions

I'm trying to overcome the following situation. Given a directory stored on an NTFS volume, where: The directory owner is set to someone else (a non-privileged user for example) The directory DACL is configured to permit access to a specific group…
Kyle Brantley
  • 315
  • 1
  • 2
  • 9
9
votes
2 answers

GetFullPathNameW and long Windows file paths

In the Windows version of my current personal project, I'm looking to support extended length filepaths. As a result, I'm a little confused with how to use the GetFullPathNameW API to resolve the full name of a long filepath. According to the MSDN…
Charles Grunwald
  • 1,441
  • 18
  • 22
9
votes
4 answers

Is it easier to write filesystem drivers in userspace than in kernel space?

I will use the Linux NTFS driver as an example. The Linux kernel NTFS driver only has very limited write support in the kernel, and after 5 years it is still considered experimental. The same development team creates the ntfsmount userspace driver,…
Jack
  • 105
  • 1
  • 3
9
votes
5 answers

Opening many small files on NTFS is way too slow

I am writing a program that should process many small files, say thousands or even millions. I've been testing that part on 500k files, and the first step was just to iterate a directory which has around 45k directories in it (including subdirs of…
Amy
  • 1,814
  • 2
  • 23
  • 38
9
votes
0 answers

why NTFS filesystem is so slow compared to EXT3 filesystem when copying large amount of small files?

I've run the following test I've created a folder containing 15'000 files of 400 bytes using this batch : @ECHO off SET times=15000 FOR /L %%i IN (1,1,%times%) DO ( fsutil file createnew filename%%i.txt 400 ) then I copy past it on my Windows…
Arno 2501
  • 8,921
  • 8
  • 37
  • 55
8
votes
3 answers

Intentionally corrupt the file system

I have to explicitly test the case what my application does if it tries to access some corrupted part of an NTFS file system. I looked around for similar questions but those were about corrupting specific files (i.e. destroy the syntax of an xml…
klaustopher
  • 6,702
  • 1
  • 22
  • 25
8
votes
3 answers

How can I set a file's compression attribute in Delphi?

How can I compact files (set the 'c' attribute) from Delphi? I am speaking about the "compress contents to save disk space" function available under NTFS. It seems that FileSetAttr does not allow me to set the 'c' attribute for a file.
Gabriel
  • 20,797
  • 27
  • 159
  • 293
8
votes
1 answer

How to iterate over long path names with any form of the Windows API

I have some files on a server that exceed the MAX_PATH limit. I've repeatedly heard that you can list those files by pre-pending \\?\ to the path. However, that doesn't solve the problem with FindFirstFile[Ex] and its partners as they use a data…
JimR
  • 15,513
  • 2
  • 20
  • 26