this post was submitted on 03 Aug 2026
373 points (97.9% liked)

Programmer Humor

32608 readers
835 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 

ahh

~$ which cat
you are viewing a single comment's thread
view the rest of the comments
[โ€“] rumba@lemmy.zip 3 points 1 day ago (1 children)

Reverse chronological order, mostly

tac log.txt |head # would give you newest first

no good for sort because sort already supports -r

no need it for tail on large files because tail already skips to the end.

I do a lot of impromptu bash to sus crap out of logs.

when you're balls deep in

cat log|grep -v foo| rev|cut -f 1-3 -d \ | |rev

Sometimes tac comes in clutch.

[โ€“] Sprocketfree@sh.itjust.works 4 points 21 hours ago

That's fair. I'd usually just use less and drop to the end. My use cases would always need the older log before a newer log though because that's the start of the problem. At least that's how I operate.