ntfs

Aria2 CONF

核能气质少年 提交于 2019-12-04 20:27:48
1 大文件磁盘预分配需要关注,按 aria2c cmdoption-file-allocation 的记录缺省的配置为 prealloc 但这个是最慢的。falloc只能在windows + NTFS下有效, deianb + NTFS无效。考虑到下载为主的需求,选择了none,以及8M磁盘缓存。 2 webui常用: http://aria2c.com/ https://ziahamza.github.io/webui-aria2/ http://ariang.mayswind.net/latest/#!/downloading 后续: 试用trunc和ext等的格式。 来源: https://www.cnblogs.com/TanHC/p/11881658.html

How do I read Windows NTFS's Alternate Data Stream using Java's IO?

限于喜欢 提交于 2019-12-04 17:47:45
I'm trying to have my Java application read all the data in a given path. So files, directories, metadata etc. This also includes one weird thing NTFS has called Alternate Data Stream (ADS). Apparently it's like a second layer of data in a directory or file. You can open the command prompt and create a file in the ADS using ':', for example: C:\ADSTest> echo test>:ads.txt So, C:\ADSTest> notepad :ads.txt Should open a notepad that contains the string "test" in it. However, if you did: C:\ADSTest> dir You will not be able to see ads.txt. However, if you use the dir option that displays ADS data

Store metadata outside of file: Any standard approach on modern Windows?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 16:17:51
My C# app syncs files from a remote document management system to a filesystem. The document management system has metadata (date of last audit, secrecy, author...) which is associated with each file but not stored WITHIN each file. The files can be anything (bmp, xwd, pdf, unknown binary) I want to make these metadata visible on the local Windows filesystem. But I can't store metadata WITHIN each file. For instance, changing the secrecy of a file must NOT modify the checksum of the file. What is the best way to store this metadata? I have heard about NTFS extended file attributes , is it

Setting NTFS Permissions With Powershell

纵饮孤独 提交于 2019-12-04 12:33:44
Using the following powershell I have set the NTFS Permissions for a folder for full control. For some reason this is only applying to the folder and not its contents. I followed the instructions located here $username = "exampleuser" $permissionArgs = "domain\$username", "FullControl", "allow" $permissionRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permissionArgs $acl = Get-Acl 'C:\Users\username1\Desktop\TESTING2' $acl.SetAccessRule($permissionRule) Set-ACL -Path 'C:\Users\username1\Desktop\TESTING2' -AclObject $acl When I use CACLS to see the permissions I get the

Speed up NTFS file enumeration (using FSCTL_ENUM_USN_DATA and NTFS MFT / USN journal)

吃可爱长大的小学妹 提交于 2019-12-04 10:54:55
I'm enumerating the files of a NTFS hard drive partition, by looking at the NTFS MFT / USN journal with: HANDLE hDrive = CreateFile(szVolumePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL); DWORD cb = 0; MFT_ENUM_DATA med = { 0 }; med.StartFileReferenceNumber = 0; med.LowUsn = 0; med.HighUsn = MAXLONGLONG; // no change in perf if I use med.HighUsn = ujd.NextUsn; where "USN_JOURNAL_DATA ujd" is loaded before unsigned char pData[sizeof(DWORDLONG) + 0x10000] = { 0 }; // 64 kB while (DeviceIoControl(hDrive, FSCTL_ENUM_USN_DATA, &med, sizeof(med), pData,

C# code to automatically give IIS write access to a folder on Windows Server 2008? Currently throws exception

一曲冷凌霜 提交于 2019-12-04 08:27:00
I am trying to write a command line tool that will give IIS7.5 on windows server 2008 write access to a folder in the wwwroot, so that a web application has access to write to a specific folder within it's base directory. Formerly, you would do this by assigning the IIS_WPG group on the folder giving that group Modify access. In Server 2008 I'm trying to do the same thing with IIS_IUSRS, but an exception is ocurring. Here is the code: private static void ManagePermissions(string directory, string account, FileSystemRights rights, AccessControlType controlType, bool addAccess) { DirectoryInfo

How do I get *change* file time in Windows?

主宰稳场 提交于 2019-12-04 08:15:54
I am trying to use FreeNAS CIFS share with Windows (synchronizing files from Windows to FreeNAS) and hit a problem that robocopy.exe thinks that some files need to be copied again every time I run robocopy.exe (/COPY:DAT). My favorite file management tool, Far Manager, tells me that "Change time" is different: File times on Windows: File times on CIFS share backed by FreeNAS (ZFS): I am perfectly fine with the fact that "change time" is lost, and I'd be happy to reset change time on the Windows drive, but I can't find how I can do that programmatically. Python's os.stat(filename) returns st

Nodejs + npm, installing modules on ntfs partition

為{幸葍}努か 提交于 2019-12-04 07:37:30
问题 I have a problem when installing npm modules. NodeJS is installed on Ubuntu 11.10 running on Virtual Box on Windows host. My project files are on NTFS partition (I have to share them with windows). When I try to install some npm module I get an error, and module is not installed. I've found out that problem occurs when npm tries to create symbolic links. Probably you can not create symlinks on NTFS partition, when I'm installing module "inside" Linux file system, everything works fine. How

How to get LBA(logical block addressing) of a file from MFT on NTFS file system?

一曲冷凌霜 提交于 2019-12-04 06:34:07
问题 I accessed the $MFT file and extracted file attributes. Given the file attributes from MFT, how to get a LBA of file from the MFT record on NTFS file system? To calculate LBA, I know that cluster number of file. It that possible using cluster number to calculate? 回答1: I'm not entirely sure of your question-- But if you're simply trying to find the logical location on disk of a file, there are various IOCTLs that will achieve this. For instance, MFT File records: FSCTL_GET_NTFS_FILE_RECORD

how to set folder ACLs from C#

徘徊边缘 提交于 2019-12-03 17:12:44
How can I automate the following manual steps in C#? Right click a folder in Windows Explorer; Properties -> Security -> Advanced -> Edit Un-tick "Include inheritable permissions from this object's parent" and click Remove. Click Add, choose a group and grant it Modify rights. I've found this article , which looks like exactly what i need, but I don't have and cant find Microsoft.Win32.Security . Aneef check the code below: DirectoryInfo dInfo = new DirectoryInfo(strFullPath); DirectorySecurity dSecurity = dInfo.GetAccessControl(); //check off & copy inherited security setting dSecurity