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).
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) <...
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 ...
When I enter the login password incorrectly 3 times, my computer locks me out from attempting a login for 10 minutes. How can I increase the number of attempts?
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...
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...
I tried to think of some for a while, but couldn't find any good ones. That said, there's plenty of programs I don't know. For reference: $ echo -en "hello\nworld" | tee 1.txt | bat -A ───────┬──...
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...
I have some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
I have an image (a photo) and I want to highlight certain parts of this. I want to do this from the CLI. I am planning to store the pixel coordinates of polygon vertices in a file, and when I run ...
I was looking into unlocking my login after too many incorrect password attempts. I found this post about it. Doing faillock -user $(whoami) --reset did indeed unlock the login. However, what exac...
I want to have a local DNS server on my home LAN, say at 192.168.1.123. All of my machines will use 192.168.1.123 as their only DNS server when connected to my home network. By default, my DNS ser...
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 ...
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...
I see that this is self-answered, but I disagree that the answer provided is the best way. The best way is to properly utilize the Unix philosophy, by decomposing the problem into simpler sub-probl...
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...
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?
What is the simplest shell idiom for stripping leading and trailing whitespace from a file or program output? Ideally I am looking for the equivalent of trim or strip methods in some languages. Th...
The basis of the Unix philosophy is to decompose complex tasks into simple sub-tasks, so that one can easily choose a combination of simple Unix tools to solve the problem in an intuitive way. Oft...
This appears to be set by the option deny in /etc/security/faillock.conf.
My system occasionally has an issue that looks like this: I run pacman -Syu Many things get updated Many GUI apps (including all display managers and Xorg) start refusing to run and throw up O...
I don't use Gnome, but I'm guessing it relies on xdg-open to figure out what program to use. Your first step would be to do xdg-open ~ to see if it uses the same incorrect program. If so, great - ...
You often have to read man pages to use Linux/Unix software. However, many man pages are not easy to read. They are very long, not always conveniently arranged, and man does not appear to have any ...
How can I search for files on my system? Ideally, I would like to search by various criteria, like date, name, extension, etc.