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 r~~‭

34 posts
86%
+11 −0
Q&A Run a command later

Using systemd timers is too much work? Not with systemd-run! systemd-run --user --on-active=10min some_cmd

posted 3y ago by r~~‭

Answer
84%
+9 −0
Q&A Documentation for double asterisk glob expansion

The ** pattern is an extension to, not a part of, the POSIX glob syntax. While it has emerged as an informal standard, AFAIK there is no single standard to reference to describe what it does. This...

posted 3y ago by r~~‭

Answer
83%
+8 −0
Q&A Ergonomic way to search man pages

Unix systems are made out of many small tools that focus on specific tasks but are general enough that the investment made in learning their specific switches and hotkeys pays off over many applica...

posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

Answer
83%
+8 −0
Q&A How do I view fonts?

In GNOME, gnome-font-viewer does this.

posted 3y ago by r~~‭

Answer
80%
+6 −0
Q&A greedy capture with sed

The b\+ part of the regex is already greedy. In sed, all repetitions are greedy. Your problem is that the initial .* is also greedy, and so that's gobbling up both the a and as many bs as it can. F...

posted 1y ago by r~~‭

Answer
80%
+6 −0
Q&A How does the root user locate executables?

but it clearly does see that change. Nope. Your environment is being reloaded in the sudo process. sudo echo $PATH gives the same result as echo $PATH because $PATH is expanded by your shell ...

posted 3y ago by r~~‭

Answer
77%
+5 −0
Q&A Replacing the shebang in a script

Sed has more commands than just s! You can replace the first line of the input with a new value using the c command, without having to write any regular expressions. sed "1c\\$env" "$file"

posted 7mo ago by r~~‭

Answer
77%
+5 −0
Q&A Highlight regions in an image with CLI

This is an ideal case for ImageMagick. Given input.png: Running this command: convert input.png -draw 'fill yellow fill-opacity 0.5 polygon 50,50 100,30 150,50 100,150' output.png Produces ...

posted 3y ago by r~~‭

Answer
77%
+5 −0
Q&A In a bash shell script, how to filter the command line argument list to unique entries only, for processing each?

Here's an alternative that is a one-liner drop-in for your existing script: eval set -- $(printf "%q\n" "$@" | sort -u) It works by escaping the initial arguments, piping the escaped arguments ...

posted 5y ago by r~~‭  ·  edited 5y ago by r~~‭

Answer
76%
+8 −1
Meta Should we merge with Power Users?

I vote against the merger. It's true that any LS question is likely to be on topic for PU, at least as I understand the scope of the latter, not being a participant in that community. However, I h...

posted 5y ago by r~~‭

Answer
75%
+4 −0
Q&A How do I send console output to the clipboard?

On Wayland, the wl-clipboard utility wl-copy is the program you want: echo hi | wl-copy

posted 2y ago by r~~‭

Answer
75%
+4 −0
Q&A What is cat abuse/useless use of cat?

Especially in a pedagogical context, the issue with something like cat /dev/random | head -c 20 versus the more straightforward head -c 20 /dev/random is that it communicates that extra ceremony is...

posted 2y ago by r~~‭

Answer
75%
+4 −0
Q&A Why does a reverse hexdump truncate the message?

From man xxd, the section on the -r flag (emphasis added): -r | -revert reverse operation: convert (or patch) hexdump into binary. If not writing to stdout, xxd writes into its output file with...

posted 3y ago by r~~‭

Answer
75%
+4 −0
Q&A Desktop Multiplexer for Linux? (GNU Screen for GUI apps)

Have a look at Xpra. I only use it locally but it's intended to forward from remote hosts as well.

posted 4y ago by r~~‭

Answer
72%
+6 −1
Q&A What are the correct permissions for ~/.ssh/config?

From man ssh_config: This file is used by the SSH client. Because of the potential for abuse, this file must have strict permissions: read/write for the user, and not writable by others.

posted 3y ago by r~~‭

Answer
71%
+3 −0
Q&A As root, how do I read another user's environment variables?

Nobody likes it when their ‘how can I do this?’ questions are answered with ‘don’t do this’, but while an answer could be given that would probably work well enough most of the time for many use ca...

posted 7mo ago by r~~‭

Answer
71%
+3 −0
Q&A How to enter a blank line in a terminal without executing the command

I've also tried using \ to escape the newline, but that also immediately executes, e.g. echo 'cat' \ just immediately prints cat \ This shouldn't be happening. Ending a line with \ in any ...

posted 9mo ago by r~~‭  ·  edited 9mo ago by r~~‭

Answer
71%
+3 −0
Q&A Temporarily making \u escapes use a different encoding on the command line

I don't think you can persuade Bash to use non-UTF-8 characters internally—I expect much of its code assumes that strings are ASCII-compatible. So $'\u00FF' will always translate, inside Bash, to t...

posted 1y ago by r~~‭  ·  edited 1y ago by r~~‭

Answer
71%
+3 −0
Q&A How do you generate arbitrary random numbers from /dev/random?

You want shuf. shuf -n1 -i 534-876874

posted 2y ago by r~~‭

Answer
71%
+3 −0
Q&A Rename multiple files which have a variable suffix

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

posted 3y ago by r~~‭  ·  edited 3y ago by terdon‭

Answer
71%
+3 −0
Q&A Are NixOS and Guix analogous projects?

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

posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

Answer
71%
+3 −0
Q&A Increase incorrect login attempts before locking account

Authentication events such as logging in are ultimately handled by PAM, the Linux Pluggable Authentication Modules project. PAM is very flexible and different Linux distributions will ship with dif...

posted 3y ago by r~~‭

Answer
71%
+3 −0
Q&A How do you troubleshoot bwrap/wine sandboxes for Windows games?

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

posted 3y ago by r~~‭

Answer
66%
+2 −0
Q&A how to use %F in a file URI in a .desktop file

From the Desktop Entry Specification: A command line may contain at most one %f, %u, %F or %U field code. Try storing %F in a local variable and reusing the variable. Also, take care: %F wil...

posted 2y ago by r~~‭

Answer
66%
+2 −0
Q&A How to change resolution of virtual terminal?

This isn't exactly what you asked, but the letters-too-small problem could also be solved by using a larger console font. Here is a decent overview of how to change console fonts, though I don't k...

posted 3y ago by r~~‭

Answer