this post was submitted on 14 Dec 2024
405 points (97.2% liked)

Comic Strips

12929 readers
3447 users here now

Comic Strips is a community for those who love comic stories.

The rules are simple:

Web of links

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] toynbee 1 points 3 days ago* (last edited 3 days ago) (1 children)

I used to have this problem, but now I go with one of two solutions:

  • filename-$(date +%F) (or similar)
    • example: notes-2024-12-14.txt
    • can be expanded to include further time details if more than one iteration per day is released
  • filename-Mk#
    • example: product-design-MkII (Or Mk2 if you prefer)
    • pretty much infinitely expandable and you always know which is latest
    • admittedly I'm pretty sure most systems wouldn't sort Roman numerals correctly, but I rarely have enough iterations of anything to worry about it

edit: Also, with either, you could pretty easily write a script that would symlink something like filename-latest to the newest one, but depending on how you're generating the files in question, that might be less viable.

[–] [email protected] 1 points 3 days ago (1 children)

You know how to script and what a symlink is; why aren't you using git or any other kind of version control instead?

[–] toynbee 2 points 3 days ago

Because I formed these habits in the nineties and 00's, well before git was a thing; and because nothing I write matters, other than possibly to my employers, in which case I do use (primarily) git ... Or other version control. (Believe it or not, I've used subversion.)

Most of the documents to which I apply this are things like my resume and DNS server. No one but me will ever care.

Also, I like you both for asking this question and for how you put it.