• 12 Posts
  • 521 Comments
Joined 2 years ago
cake
Cake day: June 23rd, 2023

help-circle


  • You can do some wild shit with pipes:

    • head -10 /var/log/syslog - Look at the first ten lines of one of your log files, with timestamps on the front
    • cat /var/log/syslog | cut -d' ' -f1 - Splits the lines by a space delimiter (the -d' ' part), and grabs the first “field” (the one with the timestamp, using -f1)
    • cat /var/log/syslog | cut -d' ' -f1 | cut -dT -f1 - Splits the timestamp at the “T”, and leaves only the date
    • cat /var/log/syslog | cut -d' ' -f1 | cut -dT -f1 | sort | uniq -c - Gives you a count of each date
    • grep systemd /var/log/syslog | cut -d' ' -f1 | cut -dT -f1 | sort | uniq -c - For only the lines with ‘systemd’ on it, gives you a count of each date

    The standard GNU toolkit has a ton of utilities like that for doing stuff with text files.
















  • Oh, geesh, where have I heard this pattern before with technology? Is it self-driving cars? Remember when the sky was falling because everybody said car transportation was going to change overnight because a bunch of fucking college students figured out how to win a self-driving car race. Where the hell is my fully-autonomous Level 5 self-driving car that was going to replace all of the truck driving jobs? Oh, what’s that? Are all of the jobs still here?

    Technology moves the needle. It does not jam it all the way to the other side. Stop spending trillions of dollars on pipe dreams, only to have to force expectations back to reality ten years later.