4 ms·
What is the benefit of sorting on extensions? Since extensions have no meaning to the kernel and, only a few oddball applications (tar, gzip) care about extensi
by mmh0000 2y ago
What is the benefit of sorting on extensions? Since extensions have no meaning to the kernel and, only a few oddball applications (tar, gzip) care about extensions.
The emojis are cute, but is it really quicker than reading a `-`, `d`, or `l` in the ls output?
This is my daily goto:
alias ls='ls -Av --time-style="+%Y-%h-%d %r" --group-directories-first --color'
alias ll='ls -lh'
- anigbrowl 2y agoI always sort on extensions. I want to know what things are and group similar things together.
- shric 2y agoI usually group similar type things into directories so that I don't get much of an extension mix. The exception is my download directory and for that I generally want to order by time or size.
- Tagbert 2y agoI always group by project. The OS can handle different file types in a folder. I need to be able to archive a folder and have all of the files regardless of file types.
- IgorPartola 2y agoSomething like photos processed by darktable are a good example of why this isn’t always practical. You have your raw files and your sidecar files side by side. You could separate them in settings I suspect but that’s not the default and god forbid you ever lose one. If you are in the habit of putting JPEGs in the same place you really want to separate by extension.
- kristopolous 2y agoIdeally are we talking extension or mime here and if it's the latter, how far down do you slice? Do we separate our PNGs from our JPEGs?
- GlacierFox 2y agoYeah :S
- Modified3019 2y agoYes. The easiest thing to do is just group by same extension, moving onto the next one alphabetically. So .jpg’s would be separate from .jpeg’s, despite meaning the same thing. While there are thousands of extensions, in practice most of the time you’ve got a dozen or less even in a “downloads” folder, so it’s not really a big deal to scroll to the gifs, jpgs, pngs separately if you are looking for all images.
- lolinder 2y ago> Since extensions have no meaning to the kernel and, only a few oddball applications (tar, gzip) care about extensions. This tool is pretty clearly meant to be consumed by a human—if you need a directory listing as part of a shell script you'd just use ls—and humans very much do care about extensions even if the kernel and application don't.
- ruthmarx 2y ago> only a few oddball applications (tar, gzip) care about extensions. Most desktop gui programs care about extensions.
- burnte 2y ago> What is the benefit of sorting on extensions? Since extensions have no meaning to the kernel and, only a few oddball applications (tar, gzip) care about extensions. It communicates to the human what the file is, and makes it easier to find the file you want if you only have to look through 5 files of type X rather than 60 assorted files. Humans are the number 1 users of terminal interfaces, so this changes helps that demographic.
- imbnwa 2y ago> alias ls='ls -Av --time-style="+%Y-%h-%d %r" --group-directories-first --color' Stupid macOS ls binary: unrecognized option `--time-style=+%Y-%h-%d %r'
- mmh0000 2y agoUse homebrew to install gnu coreutils. MacOS uses traditional Unix tooling, not GNU.
- nine_k 2y agoWith 30+ years of history, GNU userland is also "traditional". But it's not BSD, and Apple is not a big fan of GPL.
- mmh0000 2y agoYeah, but GNU's Not Unix, so... GNU tooling isn't "traditional Unix tooling" =P It might be traditional, but whatever tradition it is, it isn't Unix =D. I could argue this all day long! ;)
- rswail 2y agoUse Macports, it works better with MacOS and the existing frameworks etc. Has all the same things like the GNU coreutils etc, they live in /opt/local/bin and don't fight with SEP or users.