Search
An easy one-liner in POSIX-compatible shells: for f in *-min.jpg-*; do mv -- "$f" "${f%-*}"; done The only (mildly) tricky concept here is ${f%-*}, which expands to $f minus the shortest suffix...
Is there a difference between these two tags? shell shell-scripting In a sense the first could be a bigger category. E.g. If someone wants to create a new shell, then they may have questions...
It depends on how much sensitive they are. I have three classes. 1) Very sensitive directories Partitions For my ~/.ssh/, ~/.password-store/, ~/.gnupg/, and ~/.abook/, I have a drive with 4 p...
You could try and convince Linux kernel maintainers, but they are reticent to that. I wonder what they'll do after POSIX.1-202x (Issue 8) possibly will forbid those. Maybe you could patch your ke...
When viewing a message, press h. To return to the normal view, press h again. With typical viewer key bindings, h is bound to the display-toggle-weed function, which controls whether all headers a...
I wrote a filter program to overwrite each line with the next one. $ cat /usr/local/bin/ovr #!/bin/sh sed '2,$s/^/\x1B[1A\x1B[K/'; Here's the behavior: $ echo | ovr $ echo 'foo' | ovr ...
They are broadly analogous; there's a lot of cross-pollination of ideas between the projects. Some terminology first, because you'll notice that both columns have duplicate entries and this often ...
I've been persistently advocating for an analogous effort in the Software community, and generally think that any Codidact community could likely benefit from doing something similar. As a practica...
Question How can I view storage usage breakdown by media type? MWE Notes Commandline would be great, but open to anything.
You can use -Suw for that. I haven't actually tested it, but it should work according to the documentation. From man pacman (redactied/edited for clarity): UPGRADE OPTIONS (APPLY TO -S AND -U) ...
What do you want to find though? Is the + a quantifier, meaning you are looking for one or more b? Or are you looking for the literal string b+? If the latter, you don't need to escape at all and i...
I do this occasionally. It is sometimes useful to compare file titles where they aren't fixed lengths. For example: 01 02 The Beatles The Rolling Stones Help Satisfaction .m...
A solution I often use (and which is ultimately a variation of the find-based approach in the answer by Canina) also uses find, but only prints a single . per file: find . -maxdepth 1 -type f -pri...
****Since upgrading to Ubuntu 22.04 recently, immediately after a reboot I have WiFi to an internet hotspot as I did prior to upgrading. After suspend then resume, the network is no longer working...
As the error says, WSL doesn't boot using systemd in the same way a native Debian install does, so you can't use systemctl either. The answer is simply to use service instead, which doesn't rely on...
Question How do you specify underscores as Vim word boundaries when using vim mode in either bash or zsh? MWE w on this_word should place the cursor on the underscore. A second w should place th...
I've done this exact thing with these same tools, as recently as this morning. I use strace to measure file access sometimes; trouble is, a lot of programs/libraries will attempt to look for a lot...
I run Windows games with Wine, and use bwrap to sandbox them. I've noticed that passing --unshare-net to disable the network breaks many, many games (they fail to start with no obvious error messag...
MySQL is not fully open source and maintained by a corporation which was at one time regarded as very evil (there are much worse ones now). Debian is trying to protect you from yourself by not lett...
Problem I want to set a global keyboard rate for both the X session and the console that persists for external keyboards, across plug-ins and removals. To my understanding, Xorg and console sett...
Here goes nothing. An Internet search shows an answer on AskUbuntu#1164, author aneesheep. The gist is to install ImageMagick (try package name imagemagick) and then use the convert utility: conv...
The only real usable FAT options are FAT32 and exFAT. FAT32 is probably the file system with the widest cross-platform support possible, but it has a 4GB file size limit. If you want the option to ...
That depends on your definition of convenient. Are you familiar with git? Is the source of the relevant package stored on salsa.debian.org? If yes, then you can just run: git clone https://salsa.d...
If you don't mind installing something I recommend ncdu. It sorts the directories and files by size, you can exclude other mounts, navigate the tree directly and even delete files and folders as yo...
I want to create a collage of 20 screenshots from a video, arranged in a 5x4 grid, regardless of the video’s length. How can I do this efficiently on a Linux system? Specifically, I’d like a way t...