fatsort [OPTIONS] DEVICE
FATSort sorts directory structures of FAT file systems (FAT12, FAT16, FAT32 and exFAT). Many MP3 hardware players don't sort files automatically but play them in the order they were transferred to the device. FATSort can help here.
Use ASCIIbetical order for sorting
Ignore case of file names (default for most locales)
- -I PFX
Ignore file name PFX
Natural order sorting
-o FLAG Sort order of files where FLAG is one of
d : directories first (default)
f : files first
a : files and directories are not differentiated
Sort in reverse order
Sort in random order
This options makes all other sort options obsolete.
Sort by last modification date and time
The following options can be specified multiple times to select which directories shall be sorted:
- -d DIR
Sort directory DIR only
- -D DIR
Sort directory DIR and all subdirectories
- -x DIR
Don't sort directory DIR
- -X DIR
Don't sort directory DIR and its subdirectories
The following options can be specified multiple times to select which directories shall be sorted using POSIX.2 extended regular expressions:
- -e RE
Only sort directories that match regular expression RE
- -E RE
Don't sort directories that match regular expression RE
However, options -e and -E may not be used simultaneously with options -d, -D, -x and -X.
- -L LOC
Use the locale LOC instead of the locale from the environment variables
Print current order of files only
Print file system information only
Force sorting even if file system is mounted
Print some help
Print version information
DEVICE must be a FAT12, FAT16, FAT32 or exFAT file system.
WARNING: THE FILESYSTEM MUST BE CONSISTENT (NO FILESYSTEM ERRORS). PLEASE BACKUP YOUR DATA BEFORE USING FATSORT. RISK OF CORRUPT FILESYSTEM! FATSORT USER ASSUMES ALL RISK. FATSORT WILL NOT BE HELD LIABLE FOR DATA LOSS!
- fatsort /dev/sda
- fatsort -n /dev/sdb1
Sort /dev/sdb1 with natural order.
Written by Boris Leidner.
Report bugs to <email@example.com>.
Copyright © 2004-2019 Boris Leidner. License GPLv2: GNU GPL version 2 (see LICENSE.txt)
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.