Key
/FS:
file-system The file system (FAT or NTFS).
The NTFS file system does not function on floppy
disks.
/V:
label The volume label.
/Q Quick format.
/C Compression - files added to the new disk will be
compressed.
[
size] may be defined either with /F:size or /A:size
/F:
size size is the size of the floppy disk (720, 1.2, 1.44,
2.88, or 20.8).
/A:
size Allocation unit size.
Default settings (via /F)
are strongly recommended
for general use.
NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K,
64K.
FAT supports 8192, 16K, 32K, 64K, 128K, 256K.
NTFS compression is not supported for allocation
units above 4096.
Example
@echo off
Echo Warning this will reformat the entire D: disk!
PAUSE
format D: /FS:NTFS /x
"The disks had a recording density of 1,100 bits per inch, and could move data out of the drive
at 77 kilobytes per second" ~
Early hard drive specs.
FSUTIL.exe
File and Volume specific commands, Hardlink management, Quota management, USN, Sparse
file, Object ID and Reparse point management
Create a hardlink
FSUTIL
hardlink create new_filename existing_filename
Eg : fsutil hardlink create c:\foo.txt c:\bar.txt
Create a new file of a specific size
FSUTIL
file createnew filename
Eg : fsutil file createnew C:\testfile.txt 1000
Set the short NTFS filename for a file
FSUTIL
file setshortname filename shortname
Eg : fsutil file setshortname C:\testfile.txt tes1.txt
Set the valid data length for a file
FSUTIL
file setvaliddata filename datalength
Eg : fsutil file setvaliddata C:\testfile.txt 4096
Set the zero data for a file
FSUTIL
file setzerodata offset=
val length=
val filename
offset :
File offset, the start of the range to set to zeroes
length : Byte length of the zeroed range
Eg : fsutil file setzerodata offset=100 length=150
C:\Temp\sample.txt
List all drives (including mapped and Subst drives)
FSUTIL
fsinfo drives
Query drive type for a drive
FSUTIL
fsinfo drivetype volume pathname
Eg : fsutil fsinfo drivetype C:
ListLocalDrives.cmd
- List all drives
on the local computer
Query volume information
FSUTIL
fsinfo volumeinfo volume pathname
Eg : fsutil fsinfo volumeinfo C:\
Query NTFS specific volume information
FSUTIL
fsinfo ntfsinfo volume pathname
Eg : fsutil fsinfo ntfsinfo C:
Query
file system statistics
FSUTIL
fsinfo statistics volume pathname
Eg : fsutil fsinfo statistics C:
QUOTA Management
FSUTIL
quota {query|disable|track|enforce } C:
FSUTIL
quota violations
FSUTIL
quota modify volume_pathname threshold limit user
Eg : fsutil quota modify c: 3000 5000 domain\user
Find a file by user name (if Disk Quotas are enabled)
FSUTIL
file findbysid user directory
Eg : fsutil file findbysid scottb C:\users
File system options:
FSUTIL
behavior query option
FSUTIL
behavior set option
Where
option is one of:
allowextchar {0|1} Allow extended characters in filenames
disablelastaccess {0|1} Don’t generate last-access times
quotanotify
NumSeconds Log quota violations, default=3600
seconds
mftzone {1|2|3|4} Set MFT Zone, multiple of 200MB
Bugcheckoncorrupt {0|1} Enable bugcheck #
disablecompression {0|1} Disable compression #
disableencryption {0|1} Disable encryption #
encryppagingfile {0|1}
memoryusage {1|2}
Paged-pool memory cache, 1=default #
symlinkevaluation L2L:{0|1} Local to local symbolic links #
symlinkevaluation L2R:{0|1} Local to remote symbolic links #
symlinkevaluation R2R:{0|1} Remote to local symbolic links #
symlinkevaluation R2L:{0|1} Remote to remote symbolic links #
DisableDeleteNotify {0|1} Delete notifications for all
volumes#
disable8dot3 [
volumePath]
sfnNum
sfnNum is between 0 and 3
0 = Create short file names (default).
1 = don’t create short file names.
2 = Set 8.3 names on a per volume basis.
3 = Disable 8.3 names on all volumes except the system
volume.
1 = enable
option
0 = Disable option
# = Windows7/2008 option
Eg : FSUTIL behavior query disable8dot3
FSUTIL behavior set disablelastaccess 1
FSUTIL
dirty query volume pathname
FSUTIL
dirty set volume pathname
Marking a disk as dirty will prompt a
Chkdsk
at next boot
Eg : FSUTIL dirty query C:
“You can tune a file system, but you can't tune a fish” ~ Sun man page for tunefs
FTP
File Transfer Protocol
Syntax
FTP [-
options] [-s:
filename] [-w:
buffer] [
host]
key
-s:
filename Run a text file containing FTP commands.
host Host name or IP address of the remote host.
-g Disable filename wildcards.
-n No auto-login.
-i No interactive prompts during ftp.
-v Hide remote server responses.
-w:
buffer Set buffer size to buffer
(default=4096)
-d Debug
-a Use any local interface when binding data connection.
Chia sẻ với bạn bè của bạn: