• 1 Post
  • 100 Comments
Joined 10 months ago
cake
Cake day: December 16th, 2024

help-circle


  • One more puzzle piece here is that du won’t report on files that have been marked for deletion but are still held on to by some process. There’s an lsof incantation to list those, but I can’t recall it off the top of my head.

    It used to be part of sysadmin work to detect the processes that held on to large files if df reports that you’re running out of space, and restart them to make them let go of the file. But I haven’t done that in ages. And if you restarted the host OS that should have taken care of that.

    I assume you also know how to prune container resources.





  • That’s interesting I hadn’t thought about the JSON angle! Do you mean that you can actually use jq on regular command outputs like ls -l?

    No, you need to be using a tool which has json output as an option. These are becoming more common, but I think still rare among the GNU coreutils. ls output especially is unparseable, as in, there are tons of resources telling people not to do it because it’s pretty much guaranteed to break.


  • I’ve been using fish (with starship for prompt) for like a year I think, after having had a self-built zsh setup for … I don’t know how long.

    I’m capable of using awk but in a very simple way; I generally prefer being able to use jq. IMO both awk and perl are sort of remnants of the age before JSON became the standard text-based structured data format. We used to have to write a lot of dinky little regex-based parsers in Perl to extract data. These days we likely get JSON and can operate on actual data structures.

    I tried nu very briefly but I’m just too used to POSIX-ish shells to bother switching to another model. For scripting I’ll use #!/bin/bash with set -eou pipefail but very quickly switch to Python if it looks like it’s going to have any sort of serious logic.

    My impression is that there’s likely more of us that’d like a less wibbly-wobbly, better shell language for scripting purposes, but that efforts into designing such a language very quickly goes in the direction of nu and oil and whatnot.




  • esa@discuss.tchncs.detoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    2 months ago

    No, but the weirdos who insist on spelling it “SystemD” always seem to hate systemd.

    systemd is pretty great. I tend to start long-running processes as user services, and I’ve even taken to starting some apps that give an old laptop trouble with systemd-run and a slice with some memory restrictions. Easy peasy, works great, all declarative, no wibbly-wobbly shell scripts involved.




  • The fourth … appendage on the left hand is being used like a thumb, and doesn’t have any indication of knuckle even though it’d be the most bent finger if it was one. I’d say we can see four fingers on the right hand, while the left is in an indeterminate slop state where it’s only partially a comic/Disney three-finger hand, with one extra slop appendage that’s not clearly either thumb or finger.





  • I’ve very barely dipped my toes in dbus before, and the option to have something else is on its face attractive (not a fan of XML and the late 90s/early aughties style of oop), but JSON for a system interface?

    I mean, Kubernetes shows that yaml can work, but in this day and age I’d expect several options for serialisation, and for the default to be binary, not strings.

    String serialisations are primarily for humans IMO, either as readers or writers. As writers we want something with comments (and preferably no “find the missing }” game), so for that most of us would prefer something like TOML if the data is simple enough, and actually Yaml for complexity at the level of Kubernetes—JSON manages to be even more of a PITA at that level.

    But machine-to-machine? Protobuf, cap’n’proto, postcard, even CBOR should all be alternatives to examine



  • Yeah, none of that with bat:

    λ bat $(type -P bat)
    ───────┬──────────────────────────────────────────────────────────────────────────
           │ File: /usr/bin/bat   <BINARY>
    ───────┴──────────────────────────────────────────────────────────────────────────
    λ bat < $(type -P bat)
    ───────┬──────────────────────────────────────────────────────────────────────────
           │ STDIN   <BINARY>
    ───────┴──────────────────────────────────────────────────────────────────────────
    λ