• FreshLight
    link
    fedilink
    2436 months ago

    Oh fuck. I’ll use this from now on. Except for if I won’t use it next week. Then I’ll forget about it because my memory is a damn sieve.

    • @Catoblepas@lemmy.blahaj.zone
      link
      fedilink
      1236 months ago

      Just take the next step and make a text file you dump all these commands into and then forget about in a week. When you randomly stumble across it years from now you’ll be able to say “wow, I could have used this 10 months ago if I remembered it existed!”

      • boredsquirrel
        cake
        link
        fedilink
        546 months ago

        I make a separate text file per command so I can search them!

        Which I dont.

      • @prole@lemmy.blahaj.zone
        link
        fedilink
        56 months ago

        I keep a persistent “sticky note” (in KDE) drop down on my top bar where I copy/paste important commands, scripts, etc.

        I actually remember to use it sometimes.

    • @Technofrood@feddit.uk
      link
      fedilink
      126 months ago

      Use a systemd timer to send yourself a reminder. Discoverd them recently myself and honestly liking them more than cron.

    • folkrav
      link
      fedilink
      46 months ago

      I feel you. It’s however gotten a lot better since I turned some of these commands into abbreviations. They’re aliases that expands in place, more or less. Fish has them natively, I personally use zsh-abbr.

        • folkrav
          link
          fedilink
          36 months ago

          Yeah, it’s a good shell. I’ve found the lack of compatibility with some bash tools to be inconvenient enough that I just went back to zsh and found alternatives for the parts that I liked about it. Works well enough for me.

          • @prole@lemmy.blahaj.zone
            link
            fedilink
            15 months ago

            I’m relatively new to Linux in general (have only been on it for about a year and a half, but have taken to it like a fish to water), so forgive me if this is a dumb question, but what are some benefits to using zsh over bash? Are there any cons?

            • folkrav
              link
              fedilink
              1
              edit-2
              5 months ago

              Honestly, it’s just another shell. Both Bash and ZSH happen to be mostly POSIX compliant, so stuff that works for Bash tends to work with ZSH too. For me it’s mostly just about the stuff I can add to it - I use the antidote plugin manager to get additional autocomplete, syntax highlighting, suggestions, async prompt updates, that kind of thing.

    • @meiti@lemmy.world
      link
      fedilink
      16 months ago

      Using a large shell history (currently at 57283 entries) along with readline (and sometimes fzf) has served me well over the past few yeas when trying to remember past commands.

    • exu
      link
      fedilink
      English
      566 months ago

      You need a calendar and time handling anyways for logging purposes and to set timers correctly. It’s likely not that much extra work exposing that functionality.

      • @Kusimulkku@lemm.ee
        link
        fedilink
        206 months ago

        No, UNIX philosophy demands that every single one of those things is one or more separate things and that half of them are poorly or not at all maintained. Just like God intended.

          • @Kusimulkku@lemm.ee
            link
            fedilink
            7
            edit-2
            6 months ago

            Well, date time stuff for a system working with timers and scheduling actions might be pretty useful…

          • ggppjj
            link
            fedilink
            English
            46 months ago

            That’s not what it’s there for. It can also be used that way.

  • @mogoh@lemmy.ml
    cake
    link
    fedilink
    976 months ago

    Usually such things have a simple explanation. systemd does a lot with time and date, for example scheduling tasks. It’s quite obvious that it has this capabilities, when you think about it.

  • شاهد على إبادة
    link
    fedilink
    65
    edit-2
    6 months ago

    systemd is the future, and the future has been here for over a decade and yet old Unix and BSD purists still cry about it

    I have one simple thing to say to the downvoters: I am not using a minicomputer from 1970, why should I be bound by the limits set then?

    • @pimeys@lemmy.nauk.io
      link
      fedilink
      436 months ago

      Yeah, I’m also one of these people silently enjoying systemd and wayland. Every now and then there’s fuzz on one of these. I shrug, and move on still enjoying both of them.

    • Something Burger 🍔
      link
      fedilink
      56 months ago

      They are also still complaining about PulseAudio, despite Pipewire having mostly replaced it, while spending hours fiddling with ALSA to use their headphones.

  • lazynooblet
    link
    fedilink
    English
    466 months ago

    In the UK, if Christmas or New Year falls on a weekend, a seperate equivalent holiday is made during the week to compensate.

    • @blackn1ght@feddit.uk
      link
      fedilink
      176 months ago

      Wait, do other countries not do this? So if a public holiday falls on a Saturday it doesn’t get pushed to Monday?

      • @superkret@feddit.org
        link
        fedilink
        15
        edit-2
        6 months ago

        Germany doesn’t do this, but the minimum, when all holidays fall on the worst possible days, is more than the number of holidays in the UK.

      • @thebestaquaman@lemmy.world
        link
        fedilink
        11
        edit-2
        6 months ago

        Don’t do that in Norway either - just bad luck if the holidays happen to land on a weekend. On the other hand, we have five weeks of paid vacation, and holidays are not counted into those, I’m not sure how that’s done in other countries?

    • @John@discuss.tchncs.de
      link
      fedilink
      12
      edit-2
      6 months ago

      but the UK has the fewest public holidays in Europe. In Germany we have 9-13 but don’t get a day off if a public holiday is on a weekend. And we have a minimum of 20/24 days of holiday on top

    • my_hat_stinks
      link
      fedilink
      46 months ago

      This is true for all public holidays in the UK, there’s a (usually) fixed number of public holidays but the dates are flexible.

      They’re also included in the minimum 28 days paid time off too, meaning if you’re a full time worker and have to work on a bank holiday your employer is legally required to offer an extra day off somewhere else instead, either a fixed date or added to your holiday allowance. Conversely, the “extra” day off you get when a monarch keels over may be subtracted from your holiday allowance for the year. This is also why my employer is allowed to follow English bank holidays despite having next to no presence in England; the number is fixed but the dates are not.

    • @chiliedogg@lemmy.world
      link
      fedilink
      26 months ago

      Same for lots of jobs here.

      Honestly, Wednesday and Thursday are the worst days for Christmas for those of us who also get Christmas Eve because they’re the only days that don’t result in 4 days in a row off from work.

      If it’s on a Friday, we get Thursday through Saturday. If it’s on a Saturday, Sunday, or Monday, they give us Friday through Monday, and if it’s on a Tuesday, they give us Saturday through Tuesday.

      But this year, we’re off Saturday and Sunday, work Monday, are off Tuesday and Wednesday, and return to work on Thursday.

      It’s the same total number of days off, but it’s way less useful - especially if travel is involved.

  • peopleproblems
    link
    fedilink
    306 months ago

    Well. I mean, that’s pretty cool. I don’t think I would have ever guess that was an actual function from systemd but here we are

  • @frezik@midwest.social
    link
    fedilink
    296 months ago

    This plays some kind of role in the debate of systemd being good or not. I’m not sure if goes in the good column or the bad column, but I know it goes into a column.

    • @barsquid@lemmy.world
      link
      fedilink
      216 months ago

      I am typically in the group saying “systemd is overlarge with too many responsibilities” but this capability makes perfect sense for its job running services. Probably the good column.

      • @okwhateverdude@lemmy.world
        link
        fedilink
        English
        56 months ago

        This kinda functionality is surprisingly apropos to a problem I have a work, I realize. And yet, I have k8s. More and more I am appreciating the niche systemd can play with pets instead of cattle and wished corps weren’t jumping to managed k8s and all of that complexity it entails immediately.

        • @kattfisk@lemmy.dbzer0.com
          link
          fedilink
          15 months ago

          You can run systemd (or cron) inside a pod for scheduling and call the kubernetes API from there to run jobs and stuff. Not sure if this helps you, but it can be easy to overlook.

          • @okwhateverdude@lemmy.world
            link
            fedilink
            English
            25 months ago

            haha, yeah I am well aware I could do something like that. Unfortunately, once you start working for larger companies, your options for solutions to problems typically shrink dramatically and also need to fit into neat little boxes that someone else already drew. And our environment rules are so draconian, that we cannot use k8s to its fullest anyhow. Most of the people I work with have never actually touched k8s, much less any kind of server oriented UNIX. Thanks for the advice though.

  • Rose
    link
    fedilink
    245 months ago

    Well, systemd developers made one of the classic blunders a software developer can do: make a program that has to deal with time and dates. Every time I have to deal with timestamps I’m like “oh shit, here we go again”.

    Anyway, as I understood it the reason this is in systemd is because they wanted to replace cron, and it’s fine by me because cron has it’s own brain-hurt. (The cron syntax is something that always makes me squint real hard for a while.)

    • @flying_sheep@lemmy.ml
      link
      fedilink
      15 months ago

      Yeah and they actually added some usability in the form of that utility helping you debug what you’re doing. Pretty nice!

      • macniel
        link
        fedilink
        14
        edit-2
        6 months ago

        Did you know the next Friday the 13th is in December? ChatGPT didn’t know it. (I had to give it an extra date.now for it to figure it out)

  • @ScreaminOctopus@sh.itjust.works
    link
    fedilink
    English
    226 months ago

    This is basically just a way nicer, more flexible cron syntax being dressed up as something ridiculous. There are legitimate reasons for wanting something like this, like running some sort of resource heavy disk optimization the first Friday evening of every month or something.

  • @kameecoding@lemmy.world
    link
    fedilink
    206 months ago

    It is literally happening this year.

    24th is Tuesday. 1st of January is Wednesday and as a bonus Jan 6 is also a holiday in my country and that’s Monday.

    So from dec 22 to jan 6 i can be home by using just 6 days off

    • @Ullallulloo@civilloquy.com
      link
      fedilink
      36 months ago

      The 25th is a Wednesday, not a Tuesday like he was wanting. Tuesday is nice because you get a four-day weekend without using any days off. (Though, usually you’d get the next off if it was a Monday or Sunday or whatever.) I think the best is Friday or Monday because then New Year’s gives you a three-day weekend too.

      • @kameecoding@lemmy.world
        link
        fedilink
        16 months ago

        to me it doesn’t matter tbh, as long as the 24th is somewhere monday-wednesday, that means days off that week, we get 24,25,26 off.