I rarely ever use the date command, but when I need it I almost always struggle to get the right incantation. So, wrote a blog post for easy reference.

Do you use a cheatsheet as well?

  • bobthecowboy@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 months ago

    I’m addition to tldr which someone else suggested, there’s also the cheat command. It’s pretty easy to add to it’s cheat sheets, if you have custom commands, or want to keep a specific example. I’ve never kept a physical cheat sheet… They’re just too inconvenient and my fingers are probably already at the keyboard.

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 months ago

          Second sentence of the description from the man pages, “Otherwise, depending on the options specified, date will set the date and time or print it in a user-defined way.” not sure what they were on about.

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 months ago

              I get that. It’s funny I think I’ve gotten advice in the past to always check the results of search engines because they can be wrong (as in teachers said it to me) or things about Wikipedia being unreliable. But nobody does those things nowadays. Perhaps someday LLMs will be good enough that we don’t need to check them either.

    • nyan@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      arrow-down
      6
      ·
      3 months ago

      date is the command for setting the system date and time from the command line. Nothing to do with formatting, beyond the fact that it presumably applies system locale settings when echoing date-time info.