Spyke
sh.itjust.works

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.

248
Catoblepasreply
lemmy.blahaj.zone

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

130

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

33

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

12

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.

5

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

14
folkravreply
lemmy.ca

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.

5
prolereply
lemmy.blahaj.zone

Fish is super useful, but I usually only start it up if I'm having trouble finding or remembering a command.

2
folkravreply
lemmy.ca

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.

3
prolereply
lemmy.blahaj.zone

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?

1

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.

1

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.

1
lemm.ee

me: systemd is not that bloated

systemd:

120
exureply
feditown.com

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.

57
Kusimulkkureply
lemm.ee

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.

18
DrDystopiareply
lemy.lol

Finding the next super holiday is a core system feature I could survive without. 🎉

1

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

7

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

4
lemmy.ml

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.

100
Kusimulkkureply
lemm.ee

Not that that's bad when it's stuff like this

7

I never typed this command so it must be bloat that's eating my 1tb SSD /s

11
Phoenixzreply
lemmy.ca

Too much

But that has been a complaint for 10 years and it's only gotten worse

I wouldn't mind systemd if it weren't for the fact that it was to be a startup system that promised to make everything easier and faster to startup yet managing systemd is a drag at best, and of it did one thing it's making my systems boot up like mud

1
Kusimulkkureply
lemm.ee

I feel like the glued together collection of scripts was way worse to manage than systemd.

2
Phoenixzreply
lemmy.ca

Is it? It was always super easy to get anything done and with systems it suddenly got factors more complicated. Port assignment was super easy to do, note the past tense. It now requires systemd and instead of a 15 second config file change and service restart I now need to create and delete files, restart multiple services, God knows what in systems.

Simply put: why? If you make an alternative solution AT LEAST it shouldn't become way more over complicated to get basic tasks done

0

I definitely think so. Init was a mess of bash scripts and concurrency and whatnot was a problem. Making a script to start a service was very dependent on the distro, their specific decisions and whatnot. Systemd services and timers make things very easy and they have great tools to manage those. And now it's basically the same on every distro.

1
Brickedreply
feddit.org

I thought the same, but didn't we already have things like chron syntax for this? Systemd didn't have to build its own library.

-2

Aight, didn't know that. I cannot yet imagine any scheduled task that would require anything more advanced than cron (or a similar standalone syntax), but I'll just trust you with that one.

7
discuss.tchncs.de

Can you tell Cron to catch up on the things that should've happened but didn't because the system was off?

6
sh.itjust.works

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

89
discuss.tchncs.de

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

39
voxelreply
sopuli.xyz

the only reason im not using it is that it makes copying from terminal impossible

3

Have you tried emacs with evil mode? It's a bit slow, not as slow as VS code or anything, but not really fast. But it's basically neovim but you get to use lisp to configure it instead of lua

2
lemm.ee

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?

49

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.

41

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

5
Phoenixzreply
lemmy.ca

I wouldn't cry about it if it wasn't so God awful to work with

1

I've felt like systemd has been a breeze compared to the hodgepodge of different stuff that preceded it. Now most distros have it mostly the same way, tools are well documented, things works together. It wasn't always like that from what I remember

23
lazysoci.al

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

46
blackn1ghtreply
feddit.uk

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

17
superkretreply
feddit.org

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.

15

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?

11

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

12

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.

4

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.

2

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

31
midwest.social

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.

29
barsquidreply
lemmy.world

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.

22
lemmy.world

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.

6
kattfiskreply
lemmy.dbzer0.com

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.

1

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.

2
lemmy.world

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

24

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

2
Phoenixzreply
lemmy.ca

I'm sorry but Cron is really easy, of all systems.

Try using systemd with an ssh server that you want to have running on a non standard port. On non systemd it's a 15 second ordeal while on systemd I don't even know where to start, I pushed it out of my memories. It's something something create files here, restart demons there, removing other files, it is WAY WAY over complicated

0
offspecreply
lemmy.world

What do you mean? You literally just change the /etc/sshd config to point at a different port do you not?

5
Phoenixzreply
lemmy.ca

Oh yeah, without systemd that's all there is to it. With systemd, however, port management is taken out of the ssh config and is done how it was decades ago

1
offspecreply
lemmy.world

I run systemd with a different sshd service port and that's all I changed

2

.Aube it's distro dependent, but Ubuntu updated ssh a while ago to be passed through systemd. Updating the port requires systemd configuration changes

1

Well cron is "really easy" as long as your requirements are really easy too.

Run a task at specific hour or minute or weekday or whatever? Easy peasy.

Run a task at complex intervals? What the fuck is this syntax. How do I get it right even. Guess I'll come back next week and see if it ran correctly.

Actually have to look at the calendar to schedule this stuff? Oh lawd here come the hacks, they're so wide, they're coming

Run a task at, say, granularity of seconds? Of course it's not supported, who would ever need that, if you really need that just do an evil janky shellscript hack

2

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.

21
lemmy.world

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

20
civilloquy.com

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.

3

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.

1

It is, but they searched starting in 2025. Skipping this one.

2

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)

15
$ 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

(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
15
jonnereply
infosec.pub

I guess that makes a long weekend with Christmas Eve and then Christmas?

7

Not in Germany, where 25th and 26th are bank holidays. So having these close to the prior or following weekend makes for four days off

11

Seems like it would be, maybe OP has more reasons to think why Tuesday is more optimal.

3

I suppose for people in the office, it means everyone else has fucked off and the week is basically a wash.

6

Students here usually get Mondays off when the next Tuesday is a holiday. As a university sysadmin, I cherish those days because that's when we can get actual work done without having to work around the chaotic classroom reservations or work in ten-minute bursts during breaks. It's also when we can implement changes to the network and update the servers because the office workers don't tend to come in.

The last time that happened, all of us sysadmins did about three months' worth of actual work in a few hours, then used the smaller lecture hall as a cinema for the rest of the day.

3

For me if Christmas eve is a Monday we usually get the whole Monday off, if it's later in the week we only get a half day. We get from Christmas eve 12 noon to January 1 off normally

1
mlg
lemmy.world

Systemd ignored my calendar override for the builtin raid scanner, so every week my server would chug to a halt to scan the entire array.

In true systemd fashion, the documentation could not explain this behavior, so I had to make a full copy override instead of a merge override because reasons.

8

Thank you for this, I am dumb when it comes to config merge rules because I've screwed up ALSA the same way

1
lemmy.wtf

Already have a program that does that one thing, well. For stuff about dates, try the date command.

As in the case of wanting to know the day of the week of some distant future event's date:

date -d "YYYY-MM-DD" +"%A".

Had that before systemd existed.

... Since "systemd is all you need" do systemd users uninstall date?

1

it will be replaced by systemd-dated soon

Not on my machines.

I distrust the tech and the corporation behind the tech being pushed on us as the one true way.

I have no room for the one true way in the Free Software paradigm.

Amen for choice. Grateful for init freedom. ... Grateful for date freedom. ... And whatever else systemd attempts to embrace-extend-extinguish.

... Just realised, I can't tell if that["it will be replaced by systemd-dated soon"]'s satire. Systemd, so bad, one can say horrible things they'll be doing, and listeners will not be able to tell. Systemd, so bad, it's beyond susceptibility to satirical reductio-absurdism, already reduced to the absurd.

1
lemmy.blahaj.zone

Okay this is cool and all, but why would systemd have a calendar?

(also how do i do this)

1

As others have said on this thread, it's because systemd has fairly advanced timer system that basically requires implementing a calendar.

To do it, the command is in the screenshot systemd-analyze calendar "Tue *-12-25".

3

Just write your own initialization system in bash. It is more reliable and less bloated.

0

I don't think they are using popularity as a metric. But I think the functionality of it is also very good, so dunno what their gripe is.

1

You must be either the very old get off my lawn type or very young and edgy. Everyone else in between likes systemd, one of the best things that happened to GNU/Linux in a while.

8
Vilianreply
lemmy.ca

Whoever forced you? distros wanting a stable system?

11
discuss.tchncs.de

Both systemd and pulseaudio were more or less directly architected after MacOS' design of Core Audio and launchd.

Really shows how little you actually know.

2

I've worked with both coreaudio and launchd.

They weren't architected like trash, and actually did their jobs well.

If systemd was just like launchd that would be awesome, it's not, then it took over half the linux userspace, badly.

-2

Open source dev, kernel, llvm, jvm, bunch of other shit.

Never came up with anything as bad as systemd.

Don't talk shit if you don't know, been doing software since the internet was dialup.

-1