Search
This other answer uses process substitutions. Not every shell supports this feature. If your OS provides pathnames for file descriptors (/dev/fd/N or /proc/self/fd/N) then you can use them to achie...
I want to remove all files with the ".part" extension in the current directory and its subdirectories, including files with the same name but different extension. Is this correct? find . -name '*...
If your goal is to make small edits to the resulting document, you can use LibreOffice with the following command: soffice --infilter="writer_pdf_import" --convert-to docx document.pdf This wil...
I would like to recommend splitting the "installation" tag into one for "OS-installation" and "software-installation". Although both are installation processes, the challenges associated with them ...
This sounds like a good idea. Installing an OS is a very different task to installing a piece of software on that OS and you can have experts in either of them with the two groups not necessarily o...
If you are about to start the tool Start the tool from a process that already blocks or ignores SIGUSR1 and/or SIGUSR2 and let the tool inherit these settings. A blocked signal, when generated, w...
I built Python 3.11 from source (from GitHub python/cpython branch "3.11"). Here is what I did (after downloading the repo as ZIP) cd Downloads 7z x cpython-3.11.zip cd cpython-3.11 chmod +x c...
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 ...
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...
While * belongs to the POSIX standard, ** is an extension. You are right it's not in man 7 glob. Tools that treat ** specially (i.e. not as * simply followed by *) tend to agree what it means, but ...
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?
Overview A "useless use" or "abuse" of cat occurs when a Unix pipeline (sequence of commands that feed into each other, using the shell | or "pipe" operator) includes a call to cat that is unneces...
A project I want to work on requires Ruby. I was directed to RVM or rbenv. I tried rbenv first because it has Mac instructions, ran into failures, uninstalled it and installed RVM, and still ran ...
I'm still trying to solve my problem with installing Ruby on a new Mac, and some discussions are saying that I need to reinstall brew because of the change from the old chipset to the M1. (I'm jus...
If snap-store itself is preventing the update, it's straightforward: snap-store --quit sudo snap refresh snap-store But sometimes it might be something else, in which case the above solution w...
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 ...
The solution is to use an associative array to store what you've already seen: #!/bin/bash unset seen declare -A seen for arg in "$@" do if [[ -z "${seen[$arg]}" ]] then ...
Using BASH, how can I redirect stdout and stderr each, to two separate files, simultaneously? That's a mouthful, let me clarify a little: I have a hypothetical script that may/will generate outpu...
On a Linux system, a lot of files are installed from packages, many of which have different licenses (and sometimes different licenses for different files in the package). If I want to figure out ...
This blog post describes a privilege escalation, exploiting tar's --checkpoint-action option. The privilege escalation is used to solve a TryHackMe challenge. The root user calls tar via cron whi...
I'm having trouble visualizing exactly what your setup is like, but if I understand correctly, then: You have one client that you are connecting from You have one server that you are able to co...
There are keyboard shortcuts for navigation. Unfortunately they don't seem to be documented in help (at least I couldn't find an entry there), but you can see a list by typing ?. The red frame is ...
with pacman --debug We can display the mirrors that pacman uses with the --debug option. For example, when running pacman --debug -Sy, pacman will write lines like these to standard error: debug...
apt-mark aims to do this: the commands apt-mark showmanual and apt-mark showauto should show you respectively the packages which you explicitly installed and the ones which were added as dependenci...
An exclamation mark followed by space in the beginning of a pipeline will negate the final exit code of the pipeline. Here's an example in Bash. Echoing $? will print out the exit code of the prev...