this post was submitted on 25 Jul 2024
1012 points (97.5% liked)
Technology
59710 readers
5673 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I was trying to find out how to get human readable timestamps from my shell history. They gave me this crazy script. It worked but it was super slow. Later I learned you could do history -i.
Turns out, a lot of the problems in nixland were solved 3 decades ago with a single flag of built-in utilities.
Apart from me not reading the manual (or skimming to quick) I might have asked the LLM to check the history file rather than the command. Idk. I honestly didn't know the history command did anything different than just printing the history file
man 3 history
info history
Also, your .bashrc file in your $HOME Dir contains env variables you can set to modify the behaviors of the history function.
Oh I need to learn more
Honestly, I thought I knew lots.
Then, one day, I decided to read
man intro
Then I knew I knew I didn't know much.
I still don't.
But I now have a much better grasp of what/how.
I really need to alias man to man -a.
I
man -k
a lot.What's that?
The option
-k
for the commandman
allows you to search the manual pages for specific terms.Similar to the command
apropos
Examples of both in the image
I didn't know about this. Thank you for the knowledge fellow human!
I don't run crazy scripts in my machine. If I don't understand it's not safe enough.
That's how you get pranked and hacked