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 »

Activity for Iizukiā€­

Type On... Excerpt Status Date
Answer A: Calculate the SHA1 checksum of a file
There's a `sha1sum` tool in GNU coreutils. Here's ```shell $ sha1sum emptyfile da39a3ee5e6b4b0d3255bfef95601890afd80709 emptyfile ``` Note the spaces and the filename (emptyfile in this case) in the output. They may need to be accounted for in pipelines.
(more)
13 days ago
Question Calculate the SHA1 checksum of a file
How to calculate the SHA1 digest of a file in a shell?
(more)
13 days ago
Answer A: How to show motherboard model?
`dmidecode` can do this. Here's an example output from my system: ```shell dmidecode --type 2 Getting SMBIOS data from sysfs. SMBIOS 3.1.1 present. Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: ASUSTeK COMPUTER INC. Product Name: PRIME B450-PLUS ...
(more)
23 days ago
Question How to show motherboard model?
Surely there exists a command to print out the system's mother board model? Opening up the chassis is not an option.
(more)
23 days ago
Answer A: Systemd unit needs to start at boot but wait for network
Yup that's the recommended way to do it. `Wants` adds the `network-online.target` as a soft dependency.[^hard-dependency] Systemd will try to start it if it isn't up already. Networking should work after this target. `After` specifies the ordering related to other units. Without this they would...
(more)
about 1 month ago
Answer A: Systemd service status if ExecStop or ExecStopPost fails?
Yes, the unit will enter the `failed` state if either one of those failed. You verify this with a test unit like this: ```ini [Unit] Description=ExecStop failure test [Service] ExecStart=echo I might just fail in a sec! ExecStop=exit 1 ExecStopPost=exit 1 ``` Documentation wise, app...
(more)
about 1 month ago
Question Systemd service status if ExecStop or ExecStopPost fails?
Will the overall unit status be `failed` if either `ExecStop` or `ExecStopPost` fail? I would expect it to be so, but the documentation isn't very explicit about it.
(more)
about 1 month ago
Answer A: Moving the filesystem root to a different partition and booting from it
Disclaimer: I'm not a Mint (or Ubuntu) user. Using your distro's live image: 1. Do your partition stuff 2. Mount the new root to the live system at `/mnt`[^mount-location] 3. Mount your other partitions to the new root as they should be 4. Chroot into `/mnt` 5. Check your `/etc/fstab`, ther...
(more)
about 1 month ago
Answer A: How to convert json to yaml?
With `yq`: ```shell $ yq --output-format yaml . file.json > file.yaml ``` `.` is a filter which is applied to the data, but since `.` just stands for the document root, this means that the data is passed through without modification. `yq` is capable of rich document manipulation, but here ...
(more)
about 1 month ago
Question How to convert json to yaml?
How to convert a json file to yaml? Technically json is already valid yaml, but I'm talking about the characteristic easy-to-read yaml formatting with indentation and minimal quotes.
(more)
about 1 month ago
Answer A: Pacman list files installed by a package
```shell $ pacman --query --list package-name ``` Or the short version: ```shell $ pacman -Ql package-name ``` Source: pacman manpage)
(more)
about 1 month ago
Question Pacman list files installed by a package
How to show a list of files belonging to a package with pacman?
(more)
about 1 month ago
Answer A: Get notifications to dunst when systemd units fail
I have no experience with `dunst`, but generally you want a global service-level dropin file in `/etc/systemd/system/service.d/` with `OnFailure=` setting in it. This way it gets added to all services running on your system. (Except to user units, you'll need to do this separately for those.) The...
(more)
about 1 month ago
Answer A: How to export public GPG key?
This is how to save it to a file: ```shell $ gpg --export --armor key-id > my-key.pub ``` `--armor` stands for the format with printable characters.
(more)
about 2 months ago
Question How to export public GPG key?
GPG stores keys inside an internal database of some sort. How to export your public key in the familiar `-----BEGIN PGP PUBLIC KEY BLOCK-----` format so that it can be imported to other software? E.g. to a git forge.
(more)
about 2 months ago
Answer A: How to get remote container image digest with skopeo?
With the `inspect` subcommand, and you probably want to set a format to filter out all the other clutter: ```shell $ skopeo inspect --format='{{ .Digest }}' docker://docker.io/snipe/snipe-it:v6.3.4 sha256:c902a78f9a2f4f13c5b8c8b89430937438c7fdd47abdce945c608cf9adb21e7d ```
(more)
about 2 months ago
Question How to get remote container image digest with skopeo?
How to get the (index) digest of a remote container image with skopeo? So this would be your normal container image in a container registry. E.g. in docker.io
(more)
about 2 months ago
Answer A: ==> WARNING: Possibly missing firmware for module: 'foo'
Here's the relevant ArchWiki page. The gist of it is that most of those warnings are probably for some fairly obscure hardware, and can be just ignored (provided that your system indeed works fine). If you want to fix them (maybe just for the peace of mind), there are packages that contain these m...
(more)
about 2 months ago
Answer A: Prettify XML in a shell
`xmllint` from `xmllib2` can do this: ```bash $ output-dirty-xml | xmllint --format - ``` The dash in the end tells xmllint to read from stdin instead of a file. Source: manpage
(more)
2 months ago
Question Prettify XML in a shell
How to pretty print XML in a shell? I have command-line tool which outputs XML in a single line, totally unreadable. I would like something to pipe this into, to turn it into human readable XML with newlines and indentation. So something like this: ```bash $ output-dirty-xml Hey there! $ ...
(more)
2 months ago
Answer A: How to add a new drive to a BTRFS filesystem?
Add a new drive with the device command: ```bash btrfs device add /dev/new-device /path/to/the/filesystem/youre/adding/to ``` Then you probably want to balance the filesystem so that some data will actually live on the newly added drive: ```bash btrfs balance start /path/to/the/filesystem...
(more)
2 months ago
Question How to add a new drive to a BTRFS filesystem?
BTRFS is capable of spanning over multiple drives. How to add one more to an existing filesystem?
(more)
2 months ago
Answer A: What are the %U and %u parameters in desktop files?
They are defined in the Desktop Entry Specification. In fact there are also `%f` and `%F` options. They tell the desktop manager how the program handles multiple files. Like if I select a bunch of files in Dolphin and select "Open with Firefox". The small `%u` means that the program expects onl...
(more)
2 months ago
Question What are the %U and %u parameters in desktop files?
Desktop files always have either `%u` or `%U` as an argument for the program being launched. E.g. here's a line from my `firefox.desktop`: ```desktop Exec=/usr/lib/firefox/firefox %u ``` What does it mean?
(more)
2 months ago
Answer A: ldapsearch: how to ignore certificate?
This can be done by setting the `LDAPTLSREQCERT` environment variable to `never`. For example like this when issuing the command: ```bash LDAPTLSREQCERT=never ldapsearch -H ldaps://example.com:636 ... ```
(more)
3 months ago
Question ldapsearch: how to ignore certificate?
How to ignore server certificate when using ldapsearch command-line tool? Of course this isn't something you should be doing regularly, but it would be a handy asset for troubleshooting.
(more)
3 months ago
Question Find out which process is using a port
Sometimes your programs fail because the network port they are trying to use is already in use by some other process. How to find out what this other process is?
(more)
3 months ago
Answer A: How to count the lines of a file?
One way is to use `grep`: ``` $ grep --count ^ /path/to/the/file ``` The `^` character matches a start of a new line, so it basically counts the number of starting lines.
(more)
3 months ago
Question How to count the lines of a file?
How to get the number of lines in a file? I.e. for a file like this: ```txt Line one Line 2 Final line ``` I would like to do something like this: ```bash $ count-lines /path/to/the/file/above 3 ```
(more)
3 months ago
Answer A: How to find user's id (UID)?
With the `id` command: ```bash $ id --user linus ```
(more)
4 months ago
Question How to find user's id (UID)?
How to lookup user-id with the user's name? E.g. What's the UID of user linus?
(more)
4 months ago
Answer A: Show a timestamp on the right side of prompt when executing a command in ZSH
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 question: ```zsh preexec () { TIME=`date +"[%H:%M:%S]"` C=$(($COLUMNS-12)) echo -e "\03...
(more)
4 months ago
Question Show a timestamp on the right side of prompt when executing a command in ZSH
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 it should look like (just a very basic prompt for illustration): ```zsh [me@pc ]$ echo Have you tr...
(more)
4 months ago
Answer A: How to find your public IP address from command-line?
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 (or dig): ```bash $ dog +short myip.opendns.com @resolver1.opendns.com ```
(more)
5 months ago
Question How to find your public IP address from command-line?
`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 command-line?
(more)
5 months ago
Answer A: How to invert command exit code?
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 previous command (which is also an echo in this case). ```bash $ echo OpenStreetMap is the best map O...
(more)
7 months ago
Question How to invert command exit code?
How to apply a logical not to a shell command, e.g. in a Bash script? So if the command exited with 0 (success) I would like it to be changed to a non-zero value, and if it exited with a non-zero value (failure) like 1, I would like it to become 0. A negation of sorts.
(more)
7 months ago
Answer A: How to open a port in firewalld?
You add a port to the public zone like so: ```bash firewall-cmd --zone=public --add-port=8080/tcp ``` Firewalld knows already many of the commonly used ports, so you might just use the service name instead: ```bash firewall-cmd --zone=public --add-service=kdeconnect ``` These changes ...
(more)
7 months ago
Question How to open a port in firewalld?
How to open a port when using `firewalld` as the system firewall?
(more)
7 months ago
Answer A: How to create systemd unit that depends on a website being up?
To make your example work, you should add `Type=oneshot` and `RemainAfterExit=true` to the `[Service]` section. This way the unit won't be considered active until the curl has actually succeeded, and either won't go inactive afterwards. However, this is somewhat unorthodox way of going abou...
(more)
7 months ago
Answer A: How to create ed25519 subkey in GPG?
By using the non-interactive `--quick-add-key` method. This adds separate signing and encryption subkeys with expiration date one year from now: ```bash $ gpg --quick-add-key YOUR-PRIMARY-KEY-ID ed25519 sign 1y $ gpg --quick-add-key YOUR-PRIMARY-KEY-ID cv25519 encr 1y ``` Source: An abridged g...
(more)
9 months ago
Question How to create ed25519 subkey in GPG?
At the moment GPG only offers the following options when generating a new subkey the with the `addkey` command: ``` gpg> addkey Please select what kind of key you want: (3) DSA (sign only) (4) RSA (sign only) (5) Elgamal (encrypt only) (6) RSA (encrypt only) (14) Existing key fr...
(more)
9 months ago