this post was submitted on 27 Oct 2024
1302 points (99.2% liked)

linuxmemes

21603 readers
818 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 2 years ago
    MODERATORS
    top 50 comments
    sorted by: hot top controversial new old
    [–] FreshLight 244 points 1 month ago (8 children)

    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.

    [–] [email protected] 124 points 1 month ago (2 children)

    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!”

    [–] [email protected] 55 points 1 month ago (2 children)

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

    Which I dont.

    [–] [email protected] 33 points 1 month ago

    I usually print these out and put them in a safe deposit box at a bank so I never lose them

    [–] [email protected] 12 points 1 month ago

    We can store those text files in a terminal and search for them from the command line with man command!

    load more comments (1 replies)
    [–] [email protected] 12 points 1 month ago

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

    load more comments (6 replies)
    [–] [email protected] 119 points 1 month ago (3 children)

    me: systemd is not that bloated

    systemd:

    [–] [email protected] 55 points 1 month ago (1 children)

    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.

    [–] [email protected] 17 points 1 month ago (3 children)

    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.

    load more comments (3 replies)
    [–] bestboyfriendintheworld 16 points 1 month ago (1 children)

    Try scheduling a cron tab job to run a task on dates defined that way.

    load more comments (1 replies)
    [–] [email protected] 13 points 1 month ago

    I think this is for setting date oriented timers

    [–] [email protected] 99 points 1 month ago (6 children)

    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.

    [–] [email protected] 46 points 1 month ago (8 children)

    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.~~

    FTFY

    load more comments (8 replies)
    load more comments (5 replies)
    [–] rustydrd 88 points 1 month ago (3 children)

    systemd is a great operating system, it just lacks a decent text editor.

    [–] [email protected] 38 points 1 month ago (1 children)

    Good thing it's editor agnostic so everybody can do the right thing in the end and choose nano

    [–] [email protected] 40 points 1 month ago (3 children)
    [–] [email protected] 14 points 1 month ago (3 children)
    [–] [email protected] 17 points 1 month ago (1 children)

    ed is the standard text editor.

    load more comments (1 replies)
    load more comments (2 replies)
    load more comments (2 replies)
    [–] [email protected] 12 points 1 month ago

    alias systemd-texted=micro

    load more comments (1 replies)
    [–] [email protected] 60 points 1 month ago

    Thanks! I hate this. 🖤

    [–] [email protected] 49 points 1 month ago* (last edited 1 month ago) (5 children)

    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?

    [–] [email protected] 41 points 1 month 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.

    load more comments (4 replies)
    [–] [email protected] 46 points 1 month ago (5 children)

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

    [–] [email protected] 17 points 1 month ago (2 children)

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

    [–] [email protected] 15 points 1 month ago* (last edited 1 month ago) (2 children)

    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.

    load more comments (2 replies)
    [–] [email protected] 11 points 1 month ago* (last edited 1 month 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?

    [–] [email protected] 12 points 1 month ago* (last edited 1 month 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

    load more comments (3 replies)
    [–] clay_pidgin 40 points 1 month ago

    That's pretty clever.

    [–] [email protected] 36 points 1 month ago

    Finally we can put all the controversy around systemd to rest.

    [–] [email protected] 31 points 1 month 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

    [–] [email protected] 29 points 1 month ago (2 children)

    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.

    [–] [email protected] 22 points 1 month ago (3 children)

    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.

    load more comments (3 replies)
    load more comments (1 replies)
    [–] [email protected] 24 points 1 month ago (6 children)

    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.)

    load more comments (6 replies)
    [–] ScreaminOctopus 21 points 1 month 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.

    [–] [email protected] 20 points 1 month ago (3 children)

    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

    load more comments (3 replies)
    [–] [email protected] 19 points 1 month ago (1 children)

    God, I only have one question...

    Why?

    [–] [email protected] 51 points 1 month ago (1 children)
    [–] [email protected] 15 points 1 month ago* (last edited 1 month 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)

    [–] [email protected] 16 points 1 month ago

    Damn and does it work as an init too? xD.

    [–] [email protected] 15 points 1 month ago* (last edited 1 month ago)
    $ systemd-analyze calendar tomorrow
    Failed to parse calendar specification 'tomorrow': Invalid argument
    Hint: this expression is a valid timestamp. Use 'systemd-analyze timestamp "tomorrow"' instead?
    $ systemd-analyze timestamp tuesday
    Failed to parse "tuesday": Invalid argument
    Hint: this expression is a valid calendar specification. Use 'systemd-analyze calendar "tuesday"' instead?
    

    ಠ_ಠ

    $ for day in Mon Tue Wed Thu Fri Sat Sun; do TZ=UTC systemd-analyze calendar "$day 02-29"|tail -2; done
        Next elapse: Mon 2044-02-29 00:00:00 UTC
           From now: 19 years 4 months left
        Next elapse: Tue 2028-02-29 00:00:00 UTC
           From now: 3 years 4 months left
        Next elapse: Wed 2040-02-29 00:00:00 UTC
           From now: 15 years 4 months left
        Next elapse: Thu 2052-02-29 00:00:00 UTC
           From now: 27 years 4 months left
        Next elapse: Fri 2036-02-29 00:00:00 UTC
           From now: 11 years 4 months left
        Next elapse: Sat 2048-02-29 00:00:00 UTC
           From now: 23 years 4 months left
        Next elapse: Sun 2032-02-29 00:00:00 UTC
           From now: 7 years 4 months left
    

    still image from "Zach Galifianakis Math" gif, with Zach looking contemplative with math notation floating in front of his face

    (It checks out.)

    Surprisingly its calendar specification parser actually allows for 31 days in every month:

    $ TZ=UTC systemd-analyze calendar '02-29' && echo OK || echo not OK
      Original form: 02-29
    Normalized form: *-02-29 00:00:00
        Next elapse: Tue 2028-02-29 00:00:00 UTC
           From now: 3 years 4 months left
    OK
    $ TZ=UTC systemd-analyze calendar '02-30' && echo OK || echo not OK
      Original form: 02-30
    Normalized form: *-02-30 00:00:00
        Next elapse: never           
    OK
    $ TZ=UTC systemd-analyze calendar '02-31' && echo OK || echo not OK
      Original form: 02-31
    Normalized form: *-02-31 00:00:00
        Next elapse: never           
    OK
    $ TZ=UTC systemd-analyze calendar '02-32' && echo OK || echo not OK
    Failed to parse calendar specification '02-32': Invalid argument
    not OK
    
    [–] humblebun 13 points 1 month ago

    No Christmas for 5 years?? Why are you doing this to us, systemd???

    [–] [email protected] 12 points 1 month ago

    That's actually really cool!

    load more comments
    view more: next ›