Mac OS Finder - Read File Folder Order/Positions (Arrange By) thru Command Line
You can obtain this information using AppleScript, which is, of course, something you can execute from the command line using osascript.

Each Finder item has an AppleScript property called position that stores the {x, y}position of the item within its parent window (there’s another property called bounds that stores the coordinates that define the bounding rectangle of the item).

    tell application "Finder" to get the position of every file in folder "My Folder"
        --&gt; {{40, 199}, {230, 43}, {40, 43}, {40, 121}, {40, 277}, {230, 121}, {267, 184}, {230, 277}, {420, 43}}


(Can you spot the item I moved off its grid-aligned position ?)

From the command line, you might implement it like this:

    osascript -e "tell app \"finder\" to get position of items in folder posix file \"$PWD\""


which, for the same folder as above, returns

    40, 199, 230, 43, 40, 43, 40, 121, 40, 277, 230, 121, 267, 184, 230, 277, 420, 43


For a specific file:

    osascript -e "tell app \"finder\" to get position of file \"Self Portrait I.jpg\" in folder posix file \"$PWD\""
        --&gt; 230, 43