On my system:
% find ~ -name '*.*.*' | rev | cut -d. -f-2 | rev | sort | uniq -c | sort -nr | head -30 17278 d.ts 11314 js.map 6600 symbolic.png 4041 png.i 3968 cpython-37.pyc 2656 yarn-metadata.json 2614 yarn-tarball.tgz 2575 c.i 2526 csv.gz 1727 h.i 1659 opt-1.pyc 1590 opt-2.pyc 1302 autogen.js 1151 ts.map 1148 js.flow 854 svg.i 852 min.js 744 test.js 651 travis.yml 560 gif.i 522 so.0 403 indexeddb.leveldb 384 pom.sha1 368 ref.css 367 0.0 357 so.1 311 event.jsonlz4 283 xpm.i 278 ref.ui 275 am.i
Most of those I honestly have no idea what they are. That's just starting from $HOME. System wide, who knows.
On Sat, Jan 9, 2021 at 7:27 PM 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
On 2021-01-10 at 05:03:08 +1100, Chris Angelico firstname.lastname@example.org wrote:
On Sun, Jan 10, 2021 at 4:51 AM Stephen J. Turnbull email@example.com wrote:
Joseph Martinot-Lagarde writes:
One remark about this : .tar.gz files are the exception rather than the rule, and AFAIK maybe the only one ?
Not really. stem.ext -> stem.ext.zzz where zzz is a compression extension is a pretty common naming convention. For me ext == 'tar' is by far the most common case (74%), 'tis true, but 'patch' (10%), 'txt' (6%), 'tab', 'gml', 'xml', 'svg', 'pdf', 'ps', ' dvi', 'diff', 'pdb', 'cpp', 'el', and 'data' also exist somewhere under $HOME. I'll bet others show up if I search /usr, /var, and /opt.
Yep, and most of my man pages are compressed, so there's usr/share/man/man1/*.1.gz and friends.
I'd say the most common case with multiple extensions is indeed precisely two, where the first one is the type of file (or in the case of man pages, the section), and the second is a compression format. But there'll be less common cases too.
I also have a pile of whatever-x.y.z.* files, where the * is some kind of compression extension and x.y.z is a major.minor.patch identifier.
Most of the time, my brain is big enough to spot where x.y.z ends and the extension(s) begin(s), but throw in a version identifier like 4.3.beta, and all bets are off (unless I happen to know exactly what to look for, in which case I wouldn't bother with a general purpose library function that might make the wrong assumption). _______________________________________________ Python-ideas mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://firstname.lastname@example.org/message/WPDXKR... Code of Conduct: http://python.org/psf/codeofconduct/