Jump to content

Photo

FATsort for BSD, Linux, Mac OS X and UNIX


7 replies to this topic

#1 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,758 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Apr 15, 2012 10:58 AM

I found FATsort earlier this week and have successfully used it on my Mac to sort my Harmony games.

To run it on the Mac do the following:
  • Plug in your SD card and figure out the Volume Name. My SD card is named HARMONY, so the Volume Name is/Volumes/HARMONY
  • In a terminal window do the following
  • use diskutil to find out the Device Node, mine's /dev/disk2s11
    diskutil info /Volumes/HARMONY | grep "Device Node:"
  • use diskutil to Unmount (but not eject) the SD card using the Volume Name
    diskutil unmount /Volumes/HARMONY
  • use fatsort to Sort the SD card using the Device Node 2
    ./fatsort /dev/disk2s1
  • use diskutil to Eject the SD card using the Device Node
    diskutil eject /dev/disk2s1
  • You can now remove the SD card and put it in the Harmony.
1 you can leave off | grep "Device Node:", but then you'll have to read through a lot of output to find the Device Node.

2 for this to work you need to be in the directory that you unzipped fatsort into. On my system I did "make install" and it moved the program into /usr/local/bin/fatsort so I can now run the program from anywhere by leaving off the leading ./ like so:
fatsort /dev/disk2s1


Intel build of FATsort for Mac OS X
Attached File  fatsort.zip   18.8KB   1182 downloads

I'm hoping others can add to this thread with instructions for the other operating systems, and that somebody set up to compile PowerPC OS X programs could upload a version for the older Macs.

I was going to try to wrap it up in a GUI utility, but decided to leave that for somebody else to do so I can concentrate on Frantic instead.

#2 SvOlli OFFLINE  

SvOlli

    Chopper Commander

  • 215 posts
  • Location:Hannover, Germany

Posted Sun Jun 3, 2012 1:18 PM

For Debian or Ubuntu based Linux distributions, just use
sudo apt-get install fatsort
.

#3 linville OFFLINE  

linville

    Chopper Commander

  • 142 posts
  • Location:Mebane, NC

Posted Wed Mar 12, 2014 2:00 PM

For Fedora:

  sudo yum install fatsort

 



#4 Ripdubski OFFLINE  

Ripdubski

    Stargunner

  • 1,308 posts

Posted Wed Apr 9, 2014 6:35 PM

Will it sort directories and their contents as well?

Edited by Ripdubski, Wed Apr 9, 2014 6:35 PM.


#5 Ripdubski OFFLINE  

Ripdubski

    Stargunner

  • 1,308 posts

Posted Wed Apr 16, 2014 7:46 PM

Answered my own question, but for reference yes it sorts both.

Also, you can just use mount to see the device node, and right clcik eject the media from the desktop - no need for diskutil.

I documented the OSX install and usage here: http://unfinishedbit...s-with-mac-osx/

Edited by Ripdubski, Wed Apr 16, 2014 7:49 PM.


#6 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • Topic Starter
  • 12,758 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Dec 17, 2016 11:43 AM

Picked up a new gadget:
IMG_7914.jpg

and had to sort the files on the microSD card.  There's been a security change in OS X since I originally posted this, which results in a minor change to one of the steps. This step:
 
  • use fatsort to Sort the SD card using the Device Node 2
    ./fatsort /dev/disk2s1

must now be done like this:

  • use fatsort to Sort the SD card using the Device Node 2
    sudo ./fatsort /dev/disk2s1


sudo will run the command at a higher security level. You'll be prompted for your logon password to confirm.

#7 ThomH OFFLINE  

ThomH

    Chopper Commander

  • 179 posts

Posted Tue Mar 14, 2017 8:33 AM

It's clearly likely to be a super-unreliable tip, but on my Mac I found that using the Finder to move all the files off a FAT drive and then them back on had the effect of sorting them into name order*. So try that if FATsort ever becomes unmaintained or is otherwise unavailable.

 

* also the order I had the temporary folder they rested in set to display within the Finder, which may or may not be coincidence.



#8 biobern OFFLINE  

biobern

    Star Raider

  • 68 posts
  • Location:Germany

Posted Wed Jan 3, 2018 9:44 AM

It's clearly likely to be a super-unreliable tip, but on my Mac I found that using the Finder to move all the files off a FAT drive and then them back on had the effect of sorting them into name order*. So try that if FATsort ever becomes unmaintained or is otherwise unavailable.

 

 

This works for me with OSX El Capitan. But it works _not_ on my other Mac with High Sierra. :-(






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users