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