ntfs

Finding a set of file names quickly on NTFS volumes, ideally via its MFT

假如想象 提交于 2019-12-28 13:56:13
问题 I am in the middle of writing a tool that finds lost files of an iTunes library, for both Mac and Windows. On the Mac, I can quickly find files by naming using the wonderful "CatalogSearch" function. On Windows, however, there seems to be no OS API for searching by file name (or is there?). After some googling, I learned that there are tools (like TFind , Everything ) that read the NTFS directory directly and scan it to find files by name. I would like to do the same, but without having to

How can I access the file system and sector of a hard disk drive by C++?

泄露秘密 提交于 2019-12-25 06:46:14
问题 How can I read a sector of a hard disk drive, access the file system and block or cluster of a file, list of bad blocks (FAT) or cluster file (NTFS)? Or access the list of free blocks (FAT) or cluster bitmap (NTFS)? 回答1: You can use the CreateFile API to open a physical disk by specifying a special file name (e.g. "\\.\PhysicalDrive0" ) -- see the section "Physical Disks and Volumes" in the CreateFile MSDN documentation. Be very careful though, especially with write operations -- you can

Opening $MFT file causes Access denied even if run as administrator

一笑奈何 提交于 2019-12-25 01:46:57
问题 I am trying to delete a file record from MFT which I am doing successfully if I open the raw partition and reaching to required file record by parsing MFT file. Problem with this approach is that I have to lock the volume first so that I can write zeros on any MFT file record and if some other process is holding the volume lock (which is very very probable), write to raw volume fails due Windows OS restrictions. The other approach that I think of is opening "$MFT" as file and then read and

Understanding IIS6 permissions, ACL, and identity--how can I restrict access?

假装没事ソ 提交于 2019-12-24 20:21:15
问题 When an ASP.NET application is running under IIS6.0 in Windows 2003 Server with impersonation, what user account is relevant for deciding file read/write/execute access privileges? I have two scenarios where I am trying to understand what access to grant/revoke. I thought the most relevant user is probably the identity specified in the Application Pool, but that doesn't seem to be the whole story. The first issue concerns executing a local batch file via System.Diagnostics.Process.Start()--I

How can I query NTFS disk quotas in C#?

*爱你&永不变心* 提交于 2019-12-24 00:27:06
问题 I need to be able to find, for all users on a given remote machine, those users' disk quotas and actual disk usage. I need to be able to do this reporting in a C# application. (Well, technically a DLL plugin for an app I've already built; but that's irrelevant here.) The remote machine is not on the same network, however, the application executing the app is able to supply the credentials. WMI is perfectly acceptable; I just cannot find (after looking for over 3 hours now) the exact

How to safely update a file that has many readers and one writer?

时间秒杀一切 提交于 2019-12-23 20:42:40
问题 I have a set of files. The set of files is read-only off a NTFS share, thus can have many readers. Each file is updated occasionally by one writer that has write access. How do I ensure that: If the write fails, that the previous file is still readable Readers cannot hold up the single writer I am using Java and my current solution is for the writer to write to a temporary file, then swap it out with the existing file using File.renameTo() . The problem is on NTFS, renameTo fails if target

What is the best way to check for reparse point in .net (c#)?

馋奶兔 提交于 2019-12-23 17:31:02
问题 My function is pretty much a standard search function... I've included it below. In the function I have 1 line of code responsible for weeding out Repart NTFS points. if (attributes.ToString().IndexOf("ReparsePoint") == -1) The problem is now I am getting an error Access to the path 'c:\System Volume Information' is denied. I debugged the code and the only attributes at run time for this directory are : System.IO.FileAttributes.Hidden | System.IO.FileAttributes.System | System.IO

What factors can lead to Win32 error 665 (file system limitation)?

巧了我就是萌 提交于 2019-12-23 10:54:23
问题 I maintain an application that collects data from a datalogger and appends that data to the end of a binary file. The nature of this system is that the file can grow large (> 4 gigabytes) small steps at a time. On of the users of my application has seen cases on his NTFS partition where the attempts to append data fail. The error is being reported as a result of a call to fflush(). When this happens, the return value for GetLastError() is 665 (ERROR_FILE_SYSTEM_LIMITATION). MSDN gives the

Intentionally corrupt the file system

独自空忆成欢 提交于 2019-12-23 08:54:34
问题 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 file, etc). I need to create a scenario where chkdsk would report errors in the file system in a specific location. Does anybody have any idea how I could provoke such a situation to test my application. Just in case you worry: I wouldn't do that on

某公司运维岗位笔试题10

不羁的心 提交于 2019-12-22 02:14:52
1、解释I节点在文件系统中的作用? I节点一种逻辑结构和物理结构进行转换的多级索引文件结构。在Linux文件系统中,是以块为单位存储信息的,为了找到某个文 件在存储空间的位置 , 用i节点对一个文件进行索引。I节点描述了文件属性和各数据块在磁盘上位置的一张小表。文件属性包括文 件大小、创建时间、最后访问时间、存取权限等保护信息。但是i节点是不保存文件名的。文件名是保存在一个文件目录项中。每 一个目录项中都包含了文件名和i节点。 2、简述DNS解析过程 3.什么是符号链接,什么是硬链接?符号链接与硬链接的区别是什么? 链接分硬链接和符号链接。符号链接可以建立对于文件和目录的链接。符号链接可以跨磁盘分区,符号链接的文件类型位是I, 链接文件具有新的i节点;硬链接不可以跨磁盘分区。它只能建立对文件的链接,硬链接的文件类型位是 - 号,且硬链接文件的i 节点同被链接文件的i节点相同。 4.简述进程的启动、终止的方式以及如何进行进程的査看。 1. 手工启动 用户在输入端发出命令,直接启动一个进程的启动方式。可以分为: 前台启动:直接在 SHELL 中输入命令进行启动。 后台启动:nohup方式放在后台启动。 2. 调度启动 系统管理员根据系统资源和进程占用资源的情况,事先进行调度安排,指定任务运行的时间和场合,到时候系统会自动完成该任务。 经常使用的进程调度命令为:at、batch