3 ms·
The command systemctl status *.mount Just shows the status of all mount units. It's the same command you'd use to check any other systemd unit, for examp
by heavyset_go 6y ago
The command
systemctl status *.mount
Just shows the status of all mount units.
It's the same command you'd use to check any other systemd unit, for example, if you want to check Docker's status:
systemctl status docker.service
Seems consistent and discoverable as long as you have a surface understanding of systemd units.
- regularfry 6y agoThat to me reads as "show me the status of all files ending in .mount in the current directory". Once you start hijacking shell metacharacters you're on dodgy ground.
- heavyset_go 6y agoIt's not using the shell glob syntax, it's just a regex compatible string. The find utility does the same thing: find ~/Code -type f -name *.js Where *.js isn't using the shell glob feature, it's just a regex compatible string. You could put quotes around it to make it clearer: systemctl status "*.mount" The string is matching on unit names, and the mount units have the .mount suffix.
- regularfry 6y ago> Where *.js isn't using the shell glob feature, it's just a regex compatible string. Except it isn't, because a `*` at the start of a regex is invalid. `-name` patterns given to `find` are explicitly shell glob patterns. You might be thinking of `-regex` patterns, which GNU find also has. It's a bit shonky when `find` does it because it's not saying "the shell pattern applies in this directory", and I regularly trip over it. It's something special you've got to know about how `find` works, but at least it's still anchored to the idea of being searched in a path that's also part of the command. There's a semantic link there. With `systemctl status *.mount` you've not even got that. What path is being searched for `*.mount` files? Is that path part of the `systemctl` interface? Or is this just another way that `systemctl` insists on being a special snowflake that someone's decided I now need to devote neurons to?