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...)

UPDATE: re. FATSORT

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

link|improve this question

if your memory stick was ext<2,3>, i'd say run fsck.ext<2,3> -D on it. as that would compact and sort the directories. but as it most likely fat32, i don't have a clue. – Dan D. Dec 16 '11 at 15:15
feedback

1 Answer

up vote 3 down vote accepted

You should take a look at this link:

http://www.murraymoffatt.com/software-problem-0010.html

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.