.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH FATSORT "1" "March 2026" "fatsort 1.7.1" "User Commands" .SH NAME fatsort \- FAT file system sorting utility .SH SYNOPSIS .B fatsort [\fI\,OPTIONS\/\fR] \fI\,DEVICE\/\fR .SH DESCRIPTION FATSort sorts the directory structure of FAT file systems, including FAT12, FAT16, FAT32, and exFAT. .PP Sort options: .TP \fB\-a\fR Use ASCII order for sorting. .TP \fB\-c\fR Ignore case of file names (default for most locales). .TP \fB\-I\fR PFX Ignore the prefix PFX when comparing file names. .TP \fB\-n\fR Use natural order sorting. .HP \fB\-o\fR FLAG Set the sort order of files, where FLAG is one of: .IP d : directories first (default) .IP f : files first .IP a : do not distinguish between files and directories .TP \fB\-r\fR Sort in reverse order. .TP \fB\-R\fR Sort in random order. .IP This option overrides all other sort options. .TP \fB\-t\fR Sort by last modification date and time. .PP The following options can be specified multiple times to control which directories are sorted: .TP \fB\-d\fR DIR Sort the specified directory DIR only. .TP \fB\-D\fR DIR Sort DIR and all its subdirectories. .TP \fB\-x\fR DIR Exclude DIR from sorting. .TP \fB\-X\fR DIR Exclude DIR and all its subdirectories from sorting. .PP The following options can be specified multiple times to select directories using POSIX.2 extended regular expressions: .TP \fB\-e\fR RE Only sort directories matching regular expression RE. .TP \fB\-E\fR RE Don't sort directories matching regular expression RE. .PP Note: Options \fB\-e\fR and \fB\-E\fR cannot be used together with \fB\-d\fR, \fB\-D\fR, \fB\-x\fR and \fB\-X\fR. .TP \fB\-L\fR LOC Use the specified locale LOC instead of the system locale. FATSort follows locale\-specific rules when sorting file names and directories. .PP More options: .TP \fB\-l\fR List the current file order only. .TP \fB\-i\fR Display file system information only. .TP \fB\-f\fR Force sorting even if the file system is mounted. .HP \fB\-h\fR, \fB\-\-help\fR .IP Display this help message. .HP \fB\-v\fR, \fB\-\-version\fR .IP Show version information. .TP \fB\-q\fR Suppress all non\-error output. .PP DEVICE must be a FAT12, FAT16, FAT32 or exFAT file system. .PP WARNING: THE FILE SYSTEM MUST BE CONSISTENT (I.E., FREE OF ERRORS) BEFORE RUNNING FATSORT. THERE IS A RISK OF FILE SYSTEM CORRUPTION. ALWAYS BACK UP YOUR DATA. .SH ENVIRONMENT The environment variable LC_ALL determines the system locale used by FATSort. .SH EXAMPLES .TP fatsort /dev/sda Sort /dev/sda. .TP fatsort \-n /dev/sdb1 Sort /dev/sdb1 using natural order. .SH AUTHOR Written by Boris Leidner. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2004\-2026 Boris Leidner. License GPLv2: GNU GPL version 2 (see LICENSE.txt) .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.