See dot files at top of ls output in Linux
In Terminal on macOS, the ls (list directory contents) command sorts the output of its "all files" listing so that hidden files (those that begin with a dot) appear at the top of the list, like this:
$ ls -Alh total 47640 -rw-r--r--@ 1 robg staff 28K Oct 26 15:00 .DS_Store drwxrwxrwx@ 5 robg staff 160B Oct 23 2016 .TemporaryItems ... [trimmed for display] drwxr-xr-x 8 robg staff 256B Sep 19 08:31 .wine drwx------ 13 robg staff 416B Apr 13 2019 Applications drwx------+ 20 robg staff 640B Oct 26 12:36 Desktop ... [trimmed for display]
On the server that hosts my personal sites (as well as Many Tricks), however, ls doesn't sort the invisible files to the top:
[continue reading…]