Most popular tags

Welcome to, where you can ask questions and receive answers from other members of the community.

How to reorder folders? (as displayed in `ls -U`)

I've got a number of unordered folders on a memory stick, which my car stereo shows in order of their real position on the stick (i.e. same as ls -U) What's the easiest way of physically reordering these directories? (moving all directories to a 'tmp' folder and back seems to work via GUI, but not particularly elegant...)


fatsort (see answer below) seems to do the job nicely.
The order of actions is now:
1. sudo umount /media/USB_STICK_NAME
2. sudo blkid (which tells me the device: /dev/sdc1: LABEL="USB_STICK_NAME" ...)
3. sudo fatsort /dev/sdc1

1 Answer

You should take a look at this link:

According to what I am reading there is a utility called FATSort which can re-arrange the files for you.

It is actually also available from the Ubuntu repositories so:

sudo apt-get install fatsort

For a tool that integrates fatsort and provides features on top of it: