Search
Suppose I have a directory structure like ├── src │ ├── folder_a │ │ ├── file_w │ │ └── file_x │ ├── folder_b │ │ ├── file_y │ │ └── file_z and I back it up using rsyn...
Some pacman functions require sudo. When I forget the sudo, you get: error: you cannot perform this operation unless you are root. I then have to press the keys: up, home, s, u, d, o, space, en...
Problem How do I find product and vendor names for use with a xorg.conf file? Neither the xorg.conf nor the xinput manuals specify how to do this. xinput lists info, but the output lacks column ...
How to lookup user-id with the user's name? E.g. What's the UID of user linus?
The preexec function is called right before executing commands, so it's the place to do this sorta things. This solution is adapted from Dan Berindei's original answer (CC BY-SA 3.0) to a related ...
How to configure ZSH shell to print a timestamp on the right hand side of the prompt line when executing a command? I don't want to display the time prior to executing a command. Here's about how ...
You can try to search your shell's history for brew install. Every shell has its own history command, but for example on fish I can do history | rg brew install. (rg is https://github.com/BurntSush...
If you just want the minimal set of top-level packages to install on your new system, brew leaves is less verbose than CodeFarmer's brew deps --installed. You get a nice concise list of the packag...
If I have an email in EML format, how can I determine its spam status from the terminal? My mail provider appears to insert a X-Acme-Spam-Status header. It looks like X-Acme-Spam-Status: v=1; e=b...
In case Ipify stops being free: https://dnsleaktest.com/ will show you your IP. I don't know if they have an API, but it's easy to parse the HTML: https dnsleaktest.com | rg '\d+\.\d+\.\d+\.\d+' -...
There are probably myriad services for echoing your IP back over HTTP. Here are a couple: curl https://api.ipify.org curl https://ip.me curl https://icanhazip.com
Cisco's OpenDNS (nothing to do with open source) has this magic domain myip.opendns.com which resolves to your own public IP address when looked up with standard DNS tools. For example with dog (o...
ip a command will conveniently show the addresses assigned to your network interfaces, but oftentimes this is not what the internet sees your machine as. So how to find your public IP address from...
On Arch Linux, I installed albert (from AUR) and picom as the compositor. I am using i3 as the window manager. When I bring up the albert window, it is surrounded by the ghost of a window in the b...
The existing answer is good, but I'll add a short version. man FOO is the most reliable way. A large majority of programs have a man page, and a large majority of man pages cover all aspects of ...
Git is a very good way to sync dotfiles. There are other sync methods, but git also gives you version control, which is the other crucial part of the dotfile approach. Dealing with secrets in git ...
~/.config/systemd/user intended purely for units created and managed by the user manually, or are there any automated processes that expect to control it? For example, do packages or programs ever...
The systemd manual gives a list of path where systemd looks for unit files. However, I want to isolate my units in a path of my own choosing. Is it possible to configure systemd to add some path t...
I'm trying to containerize an application that currently uses apparmor to confine Python. This allows sandboxing of user-submitted code. How can I get docker and apparmor to play well together? Cu...
Airflow is a distributed workflow manager intended for complex cloud computing use. However, it can be used to run tasks locally. You can run Airflow in single-node mode, with LocalExecutor, and w...
Historically, cron was the main way to schedule tasks on Linux. Briefly, there will be some file like /etc/crontab which will contain one line for each task. The line starts with a schedule string ...
The standard way to schedule tasks in most Linux systems nowadays is to use systemd timers. This requires writing a systemd timer config file, which has syntax similar to INI. This is summarized i...
What is a modern and practical way to handle scheduling tasks on a Linux desktop? Modern means basic features should not rely on obscure or convoluted commands and standards Practical means you...
for file in in chapter-*.xhtml do sed -ir "12s/\b([A-Z])([A-Z]+)/\1\L\2/g;" "$file" done This -ir tells GNU-sed so alter the file in place (-i) and use regexp-extended (-r). For line 12...