-
2020-07-11 13:53:12
fsutil help
查看当前设置
fsutil 8dot3name query help
fsutil 8dot3name query
0启动;1禁止;2各个盘单独设置
查看各个盘设置
fsutil 8dot3name query [c:/d:]
fsutil 8dot3name set [0/1/2/3]
fsutil 8dot3name set [c:/d:] [0/1]
进入c:/d:
查看当前的shortname
dir /x
***设置c:/Program Files需要在安全模式下
重启 F8 安全模式
fsutil file setshotname "Program Files" PROGRA~1
***设置c:/Program Files (x86)需要在带命令行的安全模式下
重启F8 带命令行安全模式
fsutil file setshotname "Program Files (x86)" PROGRA~2
shutdown -r关机并重启,shutdown -s关机
更多相关内容 -
8dot3name(长文件名与短文件名)
2021-10-29 15:11:35在很久之前,大概是Win3.x的时候,Windows中的文件名是由不超过8个字符的主文件名,和不超过3个字符的扩展名组成。到了Windows 95的时候,这个长度被扩展成主文件名+扩展名不超过255个字符。为了保证兼容性,Windows...在很久之前,大概是Win3.x的时候,Windows中的文件名是由不超过8个字符的主文件名,和不超过3个字符的扩展名组成。到了Windows 95的时候,这个长度被扩展成主文件名+扩展名不超过255个字符。为了保证兼容性,Windows提供了一种转换的方式,大意是用'~'和数字还缩短文件名的长度,比如"C:\Program Files"被转换成了"C:\Progra`1"。这种转换使得一些老的应用程序在新的Windows平台上也可以使用,但它多多少少降低了系统的性能(文件索引之类)。
想知道自己的系统有没有开启这个功能,可以通过以下命令查询:
fsutil 8dot3name query c:
"c:"表示查询C盘的状态。如果功能被启用,会显示类似如下的信息:
Disable8dot3 的卷状态为 0 (8dot3 名称创建已启用)。 NtfsDisable8dot3NameCreation 的注册表状态为默认值 2 (卷级别设置)。 基于以上的两个设置,在 c: 上启用 8dot3 名称创建。
如果在C盘上关闭这个功能,则可使用以下命令:
fsutil 8dot3name set C: 1
1表示禁用,0表示启用。如果不写盘符,则是全局设置,这时可选的有4个值:0(全部启动),1(全部禁用),2(每个盘符单独设置),3(除系统盘外全部禁用)。全局设置也可以通过注册实现:
键:HKLM\SYSTEM\CurrentControlSet\Control\FileSystem
值:NTFSDisable8dot3NameCreation 类型:REG_DWORD
可选的值就是上述的4个之一,在Windows 7(或者Windows Server 2008 R2)中的默认值是2。
-
windows环境快速创建指定大小的文件:fsutil命令详解
2019-12-04 18:02:48如果你用的是windows环境,fsutil命令可以帮你解决这个烦恼。这一节我们一起来看看这个命令。 我是T型人小付,一位坚持终身学习的互联网从业者。喜欢我的博客欢迎在csdn上关注我,如果有问题欢迎在底下的评论...在很多场景下我们需要一个很大的文件,例如测试网速,测试硬盘配额大小等等。如果这时候电脑上没有单个的大文件就会比较尴尬。如果你用的是windows环境,
fsutil
命令可以帮你解决这个烦恼。这一节我们一起来看看这个命令。我是T型人小付,一位坚持终身学习的互联网从业者。喜欢我的博客欢迎在csdn上关注我,如果有问题欢迎在底下的评论区交流,谢谢。
简单介绍
根据官方介绍,
fsutil
命令用来进行FAT和NTFS文件系统的相关操作。Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume.
使用方法详解
首先用管理员身份打开命令提示符,直接输入
fsutil
查看其参数,如下C:\Windows\system32>fsutil ---- Commands Supported ---- 8dot3name 8dot3name management behavior Control file system behavior dax Dax volume management dirty Manage volume dirty bit file File specific commands fsInfo File system information hardlink Hardlink management objectID Object ID management quota Quota management repair Self healing management reparsePoint Reparse point management storageReserve Storage Reserve management resource Transactional Resource Manager management sparse Sparse file control tiering Storage tiering property management transaction Transaction management usn USN management volume Volume management wim Transparent wim hosting management
可见其是个功能十分强大的工具,不仅可以进行具体文件的管理,还可以进行配额管理,稀疏文件管理,卷轴管理等等高级操作
常规使用
想要跑哪个功能,直接在后面接这个参数,就可以看到下一层的帮助信息。例如我想要进行上面提到的
File system information
,如下C:\Windows\system32>fsutil fsinfo ---- FSINFO Commands Supported ---- drives List all drives driveType Query drive type for a drive ntfsInfo Query NTFS specific volume information refsInfo Query REFS specific volume information sectorInfo Query sector information statistics Query file system statistics volumeInfo Query volume information
看看我电脑上的盘符信息
C:\Windows\system32>fsutil fsinfo drives Drives: C:\
只有一个c盘,接下来看看c盘的NTFS信息
C:\Windows\system32>fsutil fsinfo ntfsInfo c: NTFS Volume Serial Number : 0xb6067e29067deaaf NTFS Version : 3.1 LFS Version : 2.0 Number Sectors : 0x000000003b7627ff Total Clusters : 0x00000000076ec4ff Free Clusters : 0x00000000045684a1 Total Reserved : 0x00000000000016c2 Bytes Per Sector : 512 Bytes Per Physical Sector : 4096 Bytes Per Cluster : 4096 Bytes Per FileRecord Segment : 1024 Clusters Per FileRecord Segment : 0 Mft Valid Data Length : 0x0000000032440000 Mft Start Lcn : 0x00000000000c0000 Mft2 Start Lcn : 0x0000000000000002 Mft Zone Start : 0x0000000001e3b6c0 Mft Zone End : 0x0000000001e479c0 Max Device Trim Extent Count : 256 Max Device Trim Byte Count : 0xffffffff Max Volume Trim Extent Count : 62 Max Volume Trim Byte Count : 0x40000000 Resource Manager Identifier : 2B502E06-1116-11E9-8C4E-482AE32A9B55
因为这个命令的功能过多,这里不一一展开,重点是下面的这个创建文件的功能。
快速生成指定大小文件
创建文件需要用到上面的
file
参数C:\Windows\system32>fsutil file ---- FILE Commands Supported ---- createNew Creates a new file of a specified size findBySID Find a file by security identifier layout Query all the information available about the file optimizeMetadata Optimize metadata for a file queryAllocRanges Query the allocated ranges for a file queryCaseSensitiveInfo Query the case sensitive information for a directory queryExtents Query the extents for a file queryExtentsAndRefCounts Query the extents and their corresponding refcounts for a file queryFileID Queries the file ID of the specified file queryFileNameById Displays a random link name for the file ID queryOptimizeMetadata Query the optimize metadata state for a file queryValidData Queries the valid data length for a file setCaseSensitiveInfo Set the case sensitive information for a directory setShortName Set the short name for a file setValidData Set the valid data length for a file setZeroData Set the zero data for a file setEOF Sets the end of file for an existing file setStrictlySequential Sets ReFS SMR file as strictly sequential
需要用到第一个
createNew
功能C:\Windows\system32>fsutil file createNew Usage : fsutil file createNew <filename> <length> Eg : fsutil file createNew C:\testfile.txt 1000
这里直接告诉我们用法了,后面接两个参数,分别是文件完整路径和以Byte为单位的文件大小。
例如我们要在c盘生成一个10MB大小的文件,首先文件的大小为10*1024*1024=10485760,然后跑下面的命令
C:\Windows\system32>fsutil file createnew c:\10M.txt 10485760 File c:\10M.txt is created
简单快速地达到了目的
快速生成多个指定大小的文件
如果想要一次创建20个10MB大小的文件又应该如何做到呢?这里就需要用到批处理脚本来帮忙了。创建一个
create_file.bat
文件,写入脚本如下@echo off set a=1 :loop fsutil file createnew file%a%.txt 10485760 echo file%a% done set /a a+=1 if %a% lss 21 goto :loop pause
跑这个
create_file.bat
文件即可在当前目录生成20个10MB大小的文件了,输出结果如下,非常快速c:\Batch>create_file.bat File c:\Batch\file1.txt is created file1 done File c:\Batch\file2.txt is created file2 done File c:\Batch\file3.txt is created file3 done File c:\Batch\file4.txt is created file4 done ... ... ... File c:\Batch\file18.txt is created file18 done File c:\Batch\file19.txt is created file19 done File c:\Batch\file20.txt is created file20 done Press any key to continue . . .
关于windows批处理命令的使用,如果大家感兴趣也欢迎关注我的csdn博客,我会做一个教程专栏分享我的一些使用心得
使用场景
目前在两个场景用到过这个创建文件的需求
- 大文件测试网速
- 特定文件大小测试硬盘配额大小
总结
Windows有
fsutil
命令,在Linux中也有一个类似的命令dd
可以达到创建指定文件的目的,我会在另外一篇博客向大家分享。 -
DOS命令:fsutil
2021-02-20 22:43:56fsutil命令,显示或配置文件系统属性 fsutil---查看FSUTIL支持的子命令 Fsutil 是可用于执行多种与 FAT 和 NTFS 文件系统相关的任务(例如管理重解析点、管理稀疏文件、卸载卷或扩展卷)的命令行实用程序。由于 ...fsutil命令,显示或配置文件系统属性
fsutil ---查看FSUTIL支持的子命令
Fsutil 是可用于执行多种与 FAT 和 NTFS 文件系统相关的任务(例如管理重解析点、管理稀疏文件、卸载卷或扩展卷)的命令行实用程序。由于 Fsutil 功能非常强大,因而只有完全掌握 Windows XP 的高级用户才能使用它。此外,必须作为管理员或管理员组的成员登录才能使用 Fsutil。
Fsutil是一个命令行工具,需要子命令来实现强大的功能,子命令有:
Fsutil:behavior
查询、更改、启用或禁用下列行为的相关设置:生成 8.3 字符长文件名、接收 NTFS卷上的 8.3 字符长文件名内的扩展字符、更新 NTFS 卷上的最近访问时间戳、配额事件写入系统日志的频率、NTFS 页面缓冲池和 NTFS 非页面缓冲池内存的内部缓存级别,以及保留给 MFT 区的磁盘空间量。
语法:
fsutil behavior query {disable8dot3 | allowextchar | disablelastaccess | quotanotify | memoryusage | mftzone}
fsutil behavior set [{disable8dot3 {1 | 0} | allowextchar {1 | 0} | disablelastaccess {1 | 0} | quotanotify Frequency | memoryusage Value | mftzone Value}]
Fsutil:dirty
查询是否设置了卷的“dirty”标识。当设置“dirty”标识后,那么在下次重新启动计算机时,autochk 将自动检查卷错误。
语法:
fsutil dirty {query | set} VolumePathname
Fsutil:file
主要由技术支持人员使用。按用户名查找文件(磁盘需启用磁盘配额)、查询文件的分配范围、设置文件短名称、设置文件的有效数据长度或设置文件零数据。
语法:
fsutil file [createnew] FileName Length
fsutil file [findbysid] UserName Directory
fsutil file [queryallocranges] offset=Offset length=Length FileName
fsutil file [setshortname] FileName ShortName
fsutil file [setvaliddata] FileName DataLength
fsutil file [setzerodata] offset=Offset length=Length FileName
Fsutil:fsinfo
主要由技术支持人员使用。列出所有驱动器,查询驱动器类型、查询卷信息,查询特定于 NTFS 卷信息,或查询文件系统统计数据。
语法:
fsutil fsinfo [drives]
fsutil fsinfo [drivetype] VolumePathname
fsutil fsinfo [ntfsinfo] RootPathname:
fsutil fsinfo [statistics] VolumePathname
fsutil fsinfo [volumeinfo] RootPathname:
Fsutil:hardlink
创建硬链接。硬链接是某个文件的目录入口。每个文件都可认为至少有一个硬链接。在 NTFS 卷上,每个文件可有多个硬链接,因而一个文件可以出现在多个目录(甚至具有不同名称的相同目录)中。由于所有的链接都引用同一个文件,所以程序能打开任意链接并修改文件。只有当一个文件的所有链接都删除后,该文件才能从文件系统中删除。创建硬链接后,程序就可以像使用其他文件名一样使用它。
语法:
fsutil hardlink create NewFileName ExistingFileName
Fsutil:objectid
主要由技术支持人员使用。管理对象标识符,Windows XP 和 Windows Server 2003 家族操作系统使用此标识符跟踪对象(如文件和目录)。
语法:
fsutil objectid [create] FileName
fsutil objectid [delete] FileName
fsutil objectid [query] FileName
fsutil objectid [set] ObjectID BirthVolumeID BirthObjectID DomainID FileName
Fsutil:quota
管理 NTFS 卷上的磁盘配额,以便对网络存储提供更精确的控制。磁盘配额是基于每个卷来实施的,并以每个用户为基础启用硬存储和软存储限制。
语法:
fsutil quota [disable] VolumePathname
fsutil quota [enforce] VolumePathname
fsutil quota [modify] VolumePathnameThresholdLimit [UserName]
fsutil quota [query] VolumePathname
fsutil quota [track] VolumePathname
fsutil quota [violations]
Fsutil:reparsepoint
主要由技术支持人员使用。查询或删除NTFS文件系统的重分析点,在输入/输出 (I/O) 子系统中用于扩展功能。重分析点用作目录连接点和卷安装点。文件系统筛选驱动程序也使用重分析点将某些文件标记为该驱动程序特定的文件。
语法:
fsutil reparsepoint [query] FileName
fsutil reparsepoint [delete] FileName
Fsutil:sparse
管理稀疏文件。程序将会发现这些未分派的包含零字节的区域,所有有意义或非零数据得到了分配,而所有无意义的数据(一大串由零组成的数据)没有得到分配。稀疏文件支持允许在文件的任意位置解除分配数据。
语法:
fsutil sparse [queryflag] FileName
fsutil sparse [queryrange] FileName
fsutil sparse [setflag] FileName
fsutil sparse [setrange] FileNameBeginningOffsetLength
Fsutil:usn
主要由技术支持人员使用。管理更新序列号 (USN) 更改日志,该日志提供了对卷中所有文件所做更改的永久性记录。
语法:
fsutil usn [createjournal] m=MaximumSize a=AllocationDelta VolumePathname
fsutil usn [deletejournal] {/D | /N} VolumePathname
fsutil usn [enumdata] FileRef LowUsn HighUsn VolumePathname
fsutil usn [queryjournal] VolumePathname
fsutil usn [readdata] FileName
Fsutil:卷
管理卷。卸下卷,或查看磁盘上的可用空间。
语法:
fsutil volume [diskfree] VolumePathname
fsutil volume [dismount] VolumePathname
-
[转]FSUTIL--Windows 下的又一个超级强大的命令
2019-06-10 23:19:56windows下有这个命令! C:\WINDOWS>fsutil ---- 支持的命令 ---- behavior 控制文件系统行为 dirty 管理卷的被损坏的位数 file 文件特定命令 fsinfo 文件... -
IIS短文件漏洞
2020-09-29 10:51:39来源地址:https://www.freebuf.com/articles/web/172561.html 一、 什么是IIS Internet Information Services(IIS,以前称为Internet ...起初用于Windows NT系列,随后内置在Windows 2000、Windows XP Profes -
FSUTIL--Windows 下的又一个超级强大的命令
2019-09-05 15:07:22windows下有这个命令! C:\WINDOWS>fsutil ---- 支持的命令 ---- behavior 控制文件系统行为 dirty 管理卷的被损坏的位数 file 文件特定命令 fsinfo 文件... -
DOS短文件名规则
2017-08-18 23:20:40fsutil behavior query disable8dot3 检查NTFS驱动是否开启8.3兼容特性 fsutil behavior set disable8dot3 1 关闭8.3兼容特性 fsutil behavior set disable8dot3 0 开启8.3兼容特性 fsutil file ... -
禁用生成8.3字符长文件名解决单目录存储大量文件写入性能下降问题
2011-08-11 17:24:00操作系统Windows Server 2003 R2 分区格式NTFS,需要在单目录中存储大量小文件,实际使用中发现... 命令行执行:fsutil behavior set disable8dot3 1,重启。 实际测试发现文件写入性能有大幅提高。 (更多关于... -
windows系统下的文件长名和文件短名
2021-01-09 09:46:18windows下的文件短名是dos+fat12/fat16时代的产物,又称为8dot3命名法,类似于PROGRA~1(目录)或者元素周~1.exe(文件)这样的名称。 8是指文件名或目录名的主体部分小于等于8个字符 ; 3是指文件名或目录名的扩展... -
Windows下在普通命令行窗口里初始化Houdini环境
2021-08-06 09:02:54d:\PROGRA~1\ 这是因为其他盘的短文件名默认没开,看这儿 Fsutil 8dot3name :: 显示状态 fsutil 8dot3name query d: :: 打开 fsutil 8dot3name set d: 0 :: 然后设一下自己需要的路径,假设你装D盘了 fsutil file ... -
Windows 10 四月更新,文件夹名称也能区分大小写?
2018-06-26 20:53:35dot3name management behavior Control file system behavior dax Dax volume management dirty Manage volume dirty bit file File specific commands fsInfo File system information hardlink Hardlink... -
中间件常见安全漏洞(转载)
2020-02-27 10:47:42查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 不同系统关闭命令稍有区别,该功能默认是开启的. 2)或从修改注册表关闭NTFS 8.3文件格式的支持 快捷键Win+R... -
iis6.0渗透实战笔记
2021-05-31 00:46:48修复改漏洞的方式:1) CMD关闭NTFS 8.3文件格式的支持 举例:(1代表关闭,0代表开启) Windows Server 2008 R2: 查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 Windows ... -
常见 Web 中间件及其漏洞概述(一):IIS
2021-11-09 18:59:11Windows Server 2003: (1代表关闭,0代表开启) 关闭该功能:fsutil behavior set disable8dot3 1 Windows Server 2008 R2: 查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set ... -
mysqldump备份、还原数据库路径名含有空格的处理方法(如:Program Files)
2021-01-19 19:01:05fsutil file setshortname <8.3name> 手工指定一个8.3短名称 dir /x 列出当前目录的子目录和文件,以及相应的8.3兼容名称(如果有的话) ----------------------------------------------------------------------... -
IIS中间件渗透总结
2021-11-17 11:35:45查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 不同系统关闭命令稍有区别,该功能是默认开启的 或从修改注册表关闭NTFS 8.3文件格式的支持 快捷键Win+R打开命令窗口,输入... -
应用安全-Web安全-漏洞修复方案整理
2019-09-27 15:29:41>axis2</parameter> View Code memcache未授权访问漏洞/couchdb未授权访问漏洞/grafana弱密码/phpmyadmin弱密码 配置强密码,或只允许特定IP访问 activemq远程命令执行 升级至 5.14 . 0 及其... -
Web中间件常见安全漏洞总结
2020-08-14 11:23:03查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 不同系统关闭命令稍有区别,该功能默认是开启的. 2)或从修改注册表关闭NTFS 8.3文件格式的支持 快捷键Win+R打开命令窗口,... -
Web安全-IIS短文件名泄露
2019-02-28 15:43:43查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 Windows Server 2003: 关闭该功能:fsutil behavior set disable8dot3 1 不同系统关闭命令稍有区别,该功能默认是... -
Web中间件漏洞总结
2022-03-22 10:12:22查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1 不同系统关闭命令稍有区别,该功能默认是开启的. 2)或从修改注册表关闭NTFS 8.3文件格式的支持 快捷键Win+R打开命令窗口,... -
中间件漏洞总结笔记
2022-04-17 22:11:31Windows Server 2003: (1代表关闭,0代表开启) 关闭该功能:fsutil behavior set disable8dot3 1 Windows Server 2008 R2: 查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set ... -
Microsoft IIS短文件名漏洞验证测试
2020-12-23 22:23:37查询服务器是否开启短文件名功能: fsutil 8dot3name query #状态为2表示开启,状态为1表示禁用 Windows server 2003关闭短文件名功能: fsutil behavior set disable8dot3 1 Windows server 2008/2012/2016关闭短... -
IIS 服务器常见漏洞
2020-03-29 18:39:01从CMD命令关闭NTFS 8.3文件格式的支持 Windows Server 2003: (1代表关闭,0代表开启) 关闭该功能:fsutil behavior set disable8dot3 1 Windows Server 2008 R2: 查询是否开启短文件名功能: fsutil 8dot3name query ... -
web漏洞之中间介漏洞
2021-05-08 15:12:08Windows Server 2003: (1代表关闭,0代表开启) 关闭该功能:fsutil behavior set disable8dot3 1 Windows Server 2008 R2: 查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set ... -
Web中间件常见安全漏洞
2020-03-10 06:56:52Windows Server 2003:(1代表关闭,0代表开启) 关闭该功能:fsutil behavior set disable8dot3 1 Windows Server 2008 R2: 查询是否开启短文件名功能:fsutil 8dot3name query 关闭该功能:fsutil 8dot3name set 1... -
getshortpatnname没有效果的解决方式
2020-11-02 17:50:40打开或者关闭磁盘是否支持创建短命名文件,所以大概率猜到了问题可能出现在这儿 再次解决 fsutil 8dot3name query c查看相关的状态 fsutil 8dot3name set C: 1 1代表关闭,0代表打开。 注册表中也可以打开 SYSTEM\...