diff --git a/knowledge base/find.md b/knowledge base/find.md index d363da0..1ea7072 100644 --- a/knowledge base/find.md +++ b/knowledge base/find.md @@ -88,6 +88,10 @@ find -type 'f' -links '+1' # Show files hard linked to a given file. # GNU extension. find -samefile 'path/to/file' + +# Hide permission errors. +find … 2>/dev/null +find … 2> >(grep -v 'Permission denied' >&2) # BASH and ZSH only ``` ## Time specifications @@ -180,6 +184,7 @@ find / -newer file.txt -user wnj -print - [find . -type f -exec chmod 644 {} ;] - [How to output file names surrounded with quotes in SINGLE line?] - [How to find all hardlinks in a folder?] +- [How can I exclude all "permission denied" messages from "find"?] [find . -type f -exec chmod 644 {} ;]: https://stackoverflow.com/questions/19737525/find-type-f-exec-chmod-644#22083532 +[how can i exclude all "permission denied" messages from "find"?]: https://stackoverflow.com/questions/762348/how-can-i-exclude-all-permission-denied-messages-from-find#40336333 [how can i find broken symlinks?]: https://unix.stackexchange.com/questions/34248/how-can-i-find-broken-symlinks [how to find all hardlinks in a folder?]: https://askubuntu.com/questions/972121/how-to-find-all-hardlinks-in-a-folder#972244 [how to output file names surrounded with quotes in single line?]: https://stackoverflow.com/questions/6041596/how-to-output-file-names-surrounded-with-quotes-in-single-line#15137696 diff --git a/knowledge base/keybase.md b/knowledge base/keybase.md index 295895d..9e19c42 100644 --- a/knowledge base/keybase.md +++ b/knowledge base/keybase.md @@ -7,8 +7,10 @@ 1. [Import an existing repository in Keybase](#import-an-existing-repository-in-keybase) 1. [Run as root](#run-as-root) 1. [Temporary devices](#temporary-devices) +1. [Troubleshooting](#troubleshooting) + 1. [`git: 'remote-keybase' is not a git command`](#git-remote-keybase-is-not-a-git-command) 1. [Further readings](#further-readings) -1. [Sources](#sources) + 1. [Sources](#sources) ## TL;DR @@ -126,6 +128,18 @@ KEYBASE_PAPERKEY='paper key' KEYBASE_USERNAME='user' keybase oneshot Exploding messages work in oneshot mode with the caveat that you cannot run multiple instances of such with the same paperkey at the same time as each instance will try to create ephemeral keys, but require a distinct paperkey to uniquely identify itself as a separate device.
In addition, ephemeral keys are **purged entirely** when closing the oneshot session, and you will not be able to access any old ephemeral content when starting keybase up again. +## Troubleshooting + +### `git: 'remote-keybase' is not a git command` + +Make sure the path to `git-remote-keybase` is in your PATH: + +```sh +export PATH="${PATH}:$( + find '/' -type 'f' -name 'git-remote-keybase' -exec dirname {} '+' \ +)" +``` + ## Further readings - [Website] @@ -134,9 +148,7 @@ In addition, ephemeral keys are **purged entirely** when closing the oneshot ses [linux guide]: https://book.keybase.io/guides/linux [website]: https://keybase.io/ -## Sources - -All the references in the [further readings] section, plus the following: +### Sources - [Keybase LFS support] - [Keybase launches encrypted git] diff --git a/snippets/find.sh b/snippets/find.sh new file mode 100644 index 0000000..c435ee2 --- /dev/null +++ b/snippets/find.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# Ignore permission errors. +# ------------------------- + +find '/' -type 'f' -name 'git-remote-keybase' 2>/dev/null + +# GNU find. +find '/' -type 'f' -name 'git-remote-keybase' -readable