fatsort - Man Page

FAT sorting tool

Synopsis

fatsort [OPTIONS] DEVICE

Description

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.

Sort options:

-a

Use ASCIIbetical order for sorting

-c

Ignore case of file names (default for most locales)

-I PFX

Ignore file name PFX

-n

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

-r

Sort in reverse order

-R

Sort in random order

This options makes all other sort options obsolete.

-t

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

More options:

-l

Print current order of files only

-i

Print file system information only

-f

Force sorting even if file system is mounted

-h, --help

Print some help

-v, --version

Print version information

-q

Be quiet

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!

Examples

fatsort /dev/sda

Sort /dev/sda.

fatsort -n /dev/sdb1

Sort /dev/sdb1 with natural order.

Author

Written by Boris Leidner.

Reporting Bugs

Report bugs to <fatsort@formenos.de>.

Info

August 2020 fatsort 1.6.3