Get ls to sort by file extension

less than 1 minute read

Get ls to sort by file extension using ls -X. I have added this to .bashrc so this is now the default. If you want the usual directory listing, for instance while perusing a directory with a lot of files of different file type, use ls -U.