Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.

Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.

Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.

Really hoping he hasn’t brought the jinx with him.

Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish

  • 0 Posts
  • 97 Comments
Joined 1 year ago
cake
Cake day: August 13th, 2024

help-circle

  • palordrolap@fedia.iotolinuxmemes@lemmy.worldlinux rm
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 hours ago

    This breaks the advice to never alias a standard command to do something radically different from its regular function.

    Sure, go ahead and alias ls to have extra options like --color, but don’t alias rm to do nothing, or even rm -i (-i is interactive and prompts for each file).

    Why? Because one day you’ll be logged into a different system that doesn’t have your cushioning alias and whoops, bye-bye files.

    Now that you think about it, you thought that ls output looked weird, but that didn’t actually break anything.

    As you suggest, yes, look into your OS’s trash option, but leave rm alone.

    GNOME-derived systems can use gio trash fileglob (or gvfs-trash on older systems) to put things in the actual desktop trash receptacle.

    KDE’s syntax sucks, but it’s kioclientX move fileglob trash:/ where X may or may not be present and is a version number of some kind.

    You could set up a shell function or script that fixes that syntax and give it any name you like - as long as it doesn’t collide with a standard one. On that rare foreign system it won’t exist and everything will be fine.


  • palordrolap@fedia.iotolinuxmemes@lemmy.worldyes
    link
    fedilink
    arrow-up
    4
    ·
    11 days ago

    This wouldn’t work.

    Well, it kind of would if you did alias downloads="cd Downloads" but then you wouldn’t cd downloads you’d just type downloads on its own.

    As other comments here already point out, you can do it with a symlink if you really want it. i.e. ln -s Downloads downloads, then you can cd downloads.

    Nowhere near the same as making everything effectively case insensitive, but it works for the odd one that you always mistype.

    There are ways to patch command completion and/or write a variant cd that does the job intelligently too, but those are harder work.

    Day-late edit that no-one will see: The answer is bind "set completion-ignore-case on". It’s embarrassing how simple this is and how long it took me to find it. I may have been trying to emulate this feature in other ways for a long time.








  • From the man manual page: man -t name-of-command | lpr -Pps

    This dumps the manual page, along with relevant formatting, to the default Postscript-capable printer attached to the system.

    There are ways to print all manual pages this way, but you’re gonna need a lot of paper. Bash’s manual page is getting towards 100 pages* and ffmpeg’s runs to nearly 700.

    By comparing compressed sizes in /usr/share/man/man1 and the equivalent page count of those two commands, I reckon my system’s full complement of manuals would be on the order of 35- to 40,000 pages.

    * Figures obtained by using man -t name-of-command | ps2pdf - outputname.pdf to create PDFs instead, then scrolling to the end. I neither have a printer nor want to actually print anything.


  • I usually set up a completely separate partition on a different drive for Timeshift. That way it doesn’t gradually eat away at system space on the main drive. And even if it was on there, it would have already eaten all that space in readiness, so to speak.

    Also, I don’t have it backing up my home directory. I do that separately.

    But that said, this post has given me the reminder to see if there are any old snapshots that could do with deleting. And there were a few. It’s now back down to roughly the same size as my main OS install again, which is about as big as it needs to be if you think about it.



  • palordrolap@fedia.iotolinuxmemes@lemmy.worldAnon updates GNU/linux
    link
    fedilink
    arrow-up
    32
    arrow-down
    1
    ·
    1 month ago

    Unfortunately, school networks are often set up by people better qualified for teaching other subjects and as such they often leave things open for enterprising, morally undeveloped, children to get their metaphorical tendrils into.

    This is how I ultimately ended up being banned from all computers in my school except one. It took them a while to figure out how to do that but I guess it became a priority what with all the “scary” things I was doing.

    As I understand it, I was still getting the blame for things after I left.


  • Whoa. What distro is it that puts everything in /bin, or at least, practically nothing in /usr/bin?

    I use a Debian that actually symlinks /bin to /usr/bin so that they’re one and the same (annoying some purists), but even on systems where they are (or were) used for separate purposes, I thought that each had a significant number of commands in them.

    (To paraphrase man hier, /bin is for necessary tools and /usr/bin is for those that are nice to have.)



  • I know you’re joking but:

    \sl or command sl.

    I’d say “check your shell documentation” but they’re both almost impossible to search for. They both work in Bash. Both skip aliases and shell functions and go straight to shell builtins or things in the $PATH.

    There’s also /usr/bin/sl but you knew that.


  • Using a Debian is like being able to stay in bed in the morning. Heck, someone might even come by and change the sheets while you’re in REM and you’ll hardly even notice.

    Everyone else is up and running about like headless chickens fighting dependency wars and system vulnerabilities and cutting themselves on that bleeding edge and you’re hugging xteddy in blissful slumber.

    Speaking of which, has he been ported to Wayland?