shell-cmd-reference/README.md

93 lines
4.2 KiB
Markdown
Raw Permalink Normal View History

2023-03-26 09:43:08 +00:00
# shell-commands quick reference
Note: many of these command shortcuts have prerequisite command line tools installed, such as:
* [fd-find](https://github.com/sharkdp/fd)
* [ffmpeg](https://ffmpeg.org/download.html)
* [pandoc](https://github.com/jgm/pandoc)
This list is primarily for my own benefit, but if you can get some use out of it, feel free to copy it.
#### Search for Brave desktop icons, and remove them:
```
grep -L -i 'thing-inside-the-file' $(fd -H "^brave-(.*)-default\.desktop" ~)|xargs rm
```
This is because between Brave and Gnome, various duplicates get stored all over the place. eg:
```
gmgauthier@plato $ grep -L -i 'youtube' $(fd -0 -H "^brave-(.*)-default\.desktop" ~)
/home/gmgauthier/.gnome/apps/brave-cdbkgaenbacighhafdaakdmolegfebcf-Default.desktop
/home/gmgauthier/.local/share/applications/brave-cdbkgaenbacighhafdaakdmolegfebcf-Default.desktop
```
2023-03-26 09:34:30 +00:00
2023-07-21 12:05:51 +00:00
---
## Fixing apt keys after a manual gnupg upgrade
```shell
sudo apt reinstall gpg
which gpg
/usr/local/bin/gpg
sudo ldconfig /usr/local/bin/gpg
sudo apt update
gpg --version
```
The "reinstall" in the first command won't actually break your fresh install. when you run the version, it will still report your new version.
```shell
gmgauthier@plato $ sudo apt reinstall gpg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/928 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 732471 files and directories currently installed.)
Preparing to unpack .../gpg_2.2.27-2+deb11u2_amd64.deb ...
Unpacking gpg (2.2.27-2+deb11u2) over (2.2.27-2+deb11u2) ...
Setting up gpg (2.2.27-2+deb11u2) ...
Processing triggers for man-db (2.9.4-2) ...
```
And yet, a moment later:
```shell
gmgauthier@plato $ gpg --version
gpg (GnuPG) 2.4.3-unknown
libgcrypt 1.10.2-unknown
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended for test purposes and should NOT be
used in a production environment or with production keys!
Copyright (C) 2023 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /home/gmgauthier/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
gmgauthier@plato $ which gpg
/usr/local/bin/gpg
gmgauthier@plato $ sudo ldconfig /usr/local/bin/gpg
gmgauthier@plato $ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-proposed-updates InRelease
Hit:5 http://deb.debian.org/debian bullseye-backports InRelease
Hit:6 https://brave-browser-apt-release.s3.brave.com stable InRelease
Hit:7 https://download.mono-project.com/repo/debian vs-buster InRelease
Hit:8 https://repo.protonvpn.com/debian stable InRelease
Hit:9 https://deb.beekeeperstudio.io stable InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
```