Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by matthewsnyder‭

208 posts
83%
+8 −0
Q&A Are there any legitimate uses for newlines in filenames?

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...

2 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by terdon‭

Question filesystem
81%
+7 −0
Q&A How to automatically block IPs that try exploit URLs?

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...

1 answer  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by GeraldS‭

Question server security caddy
80%
+6 −0
Q&A What is cat abuse/useless use of cat?

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?

3 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by Canina‭

Question cli
80%
+6 −0
Q&A How do I view fonts?

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).

2 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by andrew.46‭

Question arch-linux fonts
77%
+5 −0
Q&A Best practice for splitting data between a fast and slow drive

If I had a fast drive (SSD) and a slow one (HDD), what parts of my Linux system should go on the fast one?

1 answer  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by matthewsnyder‭

Question partitioning performance best-practices
77%
+5 −0
Q&A What's the point of faillock?

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...

0 answers  ·  posted 2y ago by matthewsnyder‭

Question security sudo
77%
+5 −0
Q&A How can I restrict filename characters?

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...

2 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by Basile Starynkevitch‭

Question filesystem
77%
+5 −0
Meta Suggestion: Basic Linux skills compendium

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...

3 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by LAFK‭

Question discussion
77%
+5 −0
Q&A When a command takes filenames as argument, how can I avoid creating temporary files?

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) &lt...

posted 3y ago by matthewsnyder‭  ·  edited 3y ago by BryKKan‭

Answer
77%
+5 −0
Q&A How to run a command on a list of files?

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...

posted 3y ago by matthewsnyder‭  ·  edited 3y ago by matthewsnyder‭

Answer
77%
+5 −0
Meta How can we grow this community?

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 ...

posted 3y ago by matthewsnyder‭  ·  edited 2y ago by matthewsnyder‭

Answer
75%
+4 −0
Q&A Fuzzy search through multiple files

When I do rg foo /bar/baz/, ripgrep will search for foo in all files under /bar/baz/. For every file that has matching lines, it will print each line with its line number, highlight the matching pa...

0 answers  ·  posted 1y ago by matthewsnyder‭

Question search
75%
+4 −0
Q&A What is the most accurate CLOC (count lines of code) program?

Objectively, the most accurate way would be to actually count the lines. So you would do wc on each file and add them up. This ends up being not a very useful statistic, because it is sensitive to...

posted 2y ago by matthewsnyder‭

Answer
75%
+4 −0
Q&A Is it a bad idea to pipe a script from curl to your shell?

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...

2 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by Stephen Kitt‭

Question security shell-scripting best-practices
75%
+4 −0
Q&A Get notified when there are unmerged changes from origin

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...

1 answer  ·  posted 2y ago by matthewsnyder‭  ·  edited 2y ago by Michael‭

Question git convenience automation
75%
+4 −0
Q&A How do you play Windows games on Linux?

A lot of games are made for Windows, and don't have an official Linux version. Can you play these on Linux? Asking specifically about games, not all programs, because games have a lot of additiona...

1 answer  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by Kanaske‭

Question windows games
75%
+4 −0
Q&A Forbid concurrent runs of a process

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, ...

2 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by Canina‭

Question cli concurrency
75%
+4 −0
Q&A How do I find out the version of a program in a terminal?

How can I print the version of a program in the terminal, so that I know which one I have installed?

3 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by alx‭

Question terminal
75%
+4 −0
Q&A How do I keep track of configuration changes?

Occasionally I ask how to do some configuration, and people tell me to do stuff like edit some config file in an XYZ directory. But if I configure everything this way, it will turn into a mess, and...

2 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 1y ago by mcast‭

Question configuration best-practices
75%
+4 −0
Q&A How do I migrate my main filesystem to a new drive?

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?

3 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by matthewsnyder‭

Question backup partitioning
75%
+4 −0
Q&A What are non-POSIX shells and what's the point of them?

I've been learning some Linux and I finally feel like I can find my way around the command line. But now I hear people say there are other, "non-POSIX" kinds of shell, with different semantics. Wha...

1 answer  ·  posted 2y ago by matthewsnyder‭  ·  last activity 2y ago by matthewsnyder‭

Question shell posix cli
75%
+4 −0
Meta shell and shell-scripting tags: duplicates?

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...

posted 3y ago by matthewsnyder‭

Answer
75%
+4 −0
Q&A How do I tweak the start parameters of GUI apps?

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...

1 answer  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by matthewsnyder‭

Question configuration graphics xdg
75%
+4 −0
Q&A Can I enter raw strings in fish to avoid escaping regexes for sed?

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...

2 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by terdon‭

Question shell sed fish quotes regex
75%
+4 −0
Q&A Why do many Windows games fail when the network is sandboxed?

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...

0 answers  ·  posted 3y ago by matthewsnyder‭  ·  last activity 3y ago by Mithical‭

Question networking wine