MyNixOS website logo
Description

FAT filesystem sort utility.

This package provides a utility for sorting files and directories on a FAT filesystem. Please see the README on GitHub at https://github.com/ExtremaIS/phatsort-haskell#readme.

PhatSort

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub CI Hackage Stackage LTS Stackage Nightly

Overview

The PhatSort project provides two command-line utilities for sorting files and directories on FAT filesystems. The phatsort utility sorts files and directories that are already on the filesystem. The seqcp utility copies files and directories to the filesystem in sorted order.

There are many MP3 players that allow you to mount the device as external storage and manage the media yourself. The storage generally uses a FAT filesystem. When copying multiple files onto the storage, using the command line (cp/mv) or a GUI, they are generally stored in an arbitrary order. This is not a problem if the firmware of the MP3 player sorts by filename, but many MP3 players use the order in the FAT filesystem without sorting, which results in podcasts and album tracks being played out of order.

There are some utilities that sort the FAT tables of an unmounted filesystem. (See Related Software for information and links.) Unfortunately, there are many devices for which this does not work. PhatSort takes a different approach to solving the problem. It works by creating new directories and moving ("renaming") the files in the desired order, while the filesystem is mounted. This method works on all devices that have been tried so far.

PhatSort also (optionally) forces the filesystem buffers to be written to the storage media after each change. This helps avoid write failures when using devices that have problems with writing large amounts of data. Note that the seqcp utility helps with this issue even on non-FAT filesystems.

CLI

Requirements

PhatSort has only been tested on Linux. It might work on other operating systems. Scripts that are output use POSIX shell commands and therefore require a POSIX shell to execute.

Installation

.deb Package Installation

Check the Releases page for .deb packages.

.rpm Package Installation

Check the Releases page for .rpm packages.

Installation From Hackage

Install PhatSort from Hackage using Cabal as follows:

$ cabal v2-install phatsort

Installation From Stackage

Install PhatSort from Stackage using Stack as follows:

$ stack install phatsort

Usage

See the phatsort and seqcp man pages for usage information.

Related Software

FATSort is a command-line utility that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. Unfortunately, there are many devices for which this does not work.

YAFS is a command-line utility that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. Visual YAFS provides a GUI. I have not tried either of these.

DriveSort is Windows GUI software that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. I have not tried it.

Project

Links

Branches

The main branch is reserved for releases. It may be considered stable, and HEAD is always the latest release.

The develop branch is the primary development branch. It contains changes that have not yet been released, and it is not necessarily stable.

Hackage revisions are made for metadata changes, such as relaxation of constraints when new versions of dependencies are released. The phatsort.cabal metadata in the main branch may therefore not match that of Hackage. The phatsort.cabal metadata in the develop branch may match, unless work is being done on a new release that contains other changes.

Tags

All releases are tagged in the main branch. Release tags are signed using the [email protected] GPG key.

Contribution

Issues and feature requests are tracked on GitHub: https://github.com/ExtremaIS/phatsort-haskell/issues

Issues may also be submitted via email to [email protected].

License

This project is released under the MIT License as specified in the LICENSE file.

Metadata

Version

0.6.0.0

License

Executables (2)

  • bin/phatsort
  • bin/seqcp

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows