Posts by matthewsnyder
Unix is very permissive with filenames, and this can sometimes lead to a bunch of annoying corner cases when printing files. A well known example is when you put a newline in a filename, and it bre...
How can I view font files, like .ttf, in Linux? I'd like to see a sample of the font (quick brown fox...) and metadata about it (like exact name).
I have a static website I serve with Caddy. The Caddy is inside a container. I notice that occasionally I get malicious requests, looking at the paths requested. Some examples are: /cgi-bin/luc...
There are several options, like xargs and for. I'll leave those for other answers and only describe my favorite, GNU Parallel. You will have to install it separately, because unlike the inferior xa...
What you're looking for is called process substitution. In Bash and many bash-like shells, you can use <(foo_command --with --arguments) instead of the file path: diff <(ls /home/alice) <...
We are all Linux users and enthusiasts on this site, as well as caring about FOSS. Although technically this is a site for technical Q&A, I think some level of Linux activism is possibly benefi...
Suppose I want to limit what characters are allowed in filenames. For example, I want file creation to fail if there is a \n in the name. Is there a way to enforce this? If it matters, I prefer a...
If I had a fast drive (SSD) and a slow one (HDD), what parts of my Linux system should go on the fast one?
Sometimes I share Unix commands online, and people chastise me for "useless use of cat" (UUOC) or "cat abuse". My cat is quite comfy and doing very well, thank you. What are they talking about?
Don't answer too many questions Avoid major tag gaps Keep the front page lively. My armchair analysis is that the funnel for this site is like this: User gets linked from internet search ...
Online, I often see someone tell people to run a command like /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" (example from https://brew.sh/). The g...
Sometimes I work with Git repos that have some changes fetched but not yet merged to the local branch. Occasionally I make commits without noticing this, which necessitates rebase/conflict resoluti...
Suppose I have some hypothetical CLI program. It is important that only one instance of this program runs at any given time. When multiple instances run concurrently, bad things happen. Normally, ...
How can I print the version of a program in the terminal, so that I know which one I have installed?
I want to switch hard drives. How do I migrate my root FS from the drive it's on, to the new one, so that everything is exactly as it is?
On a default Arch install, faillock makes it so that if you enter the sudo password wrong too many times, even the correct password will be rejected until the timer is up. At the same time, you ca...
My assumption has been that shell-scripting is for scripts only, not interactive usage. Whereas shell is everything else, like interactive usage. I wish we could edit these descriptions to clarify...
There are many GUI apps on my computer that show up as eg. items in the start menu. When I launch these, what if I want to control how exactly they are launched, such as setting environment variabl...
When running sed through fish, I often encounter a problem with regexes. Many commonly used regex control characters like []{}().+ need to be escaped, even if I type the regex in a single quoted st...
Suppose I have a list of files on standard input. These may be the output of find, cat filelist.txt or something else. How can I run a command on each file in turn?
I use Wine to play Windows games. As is well known: Wine is not a sandbox Windows games are proprietary blobs and can contain malware Windows malware can potentially harm Linux through Wine ...
How can I remap buttons on my mouse, especially for more exotic ones like MMO mice?
I think there are three general strategies: Take notes. Configure everything through some utility that keeps track of it. Learn the default state and diff the system vs. it. Taking notes ...
I want to install additional Linux distributions on my computer, so I can try some new ones and see if they're better than my current ("old") one. I've been using my current distro for a while. I'...
I installed Grub in the normal way and now I have entries in the Grub menu for linux, linux-lts, and the fallback versions of them. I want to add more entries to this. For example, I want to add l...