In most cases, the `sudo` command error `unable to initialize PAM: No such file or directory` mostly appears when the pluggable authentication module file `/etc/pam.d/sudo` was edited with a typo or wrong pam module, etc.
## Via Single-User-Mode > Terminal
If you have an older Mac, you can boot into `single-user mode`, directly into the command line mode of macOS by skipping the UI:
* Press and hold down `COMMAND + S` keys until you see commands being executed in the Terminal.
* Open the `sudo` file with `vi /Volumes/Macintosh\ - Data/etc/pam.d/`, fix what's wrong, save and close the file by switching from `INSERT` to the `COMMAND` mode with the `ESC` key, type `:wq!`, and hit `enter`.
* Close the Terminal via the menu from the top of the screen
* Restart your machine
# sync everything excluding things in .gitignore | |
# delete anything on target not in source | |
# include dotfiles and symlinks, also use compression | |
rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory |
#!/bin/bash | |
gource \ | |
-s .03 \ | |
-1280x720 \ | |
--auto-skip-seconds .1 \ | |
--multi-sampling \ | |
--stop-at-end \ | |
--key \ | |
--highlight-users \ |
This script is modeled after tee
(see [man tee
][2]) and works on Linux, macOS, Cygwin, WSL/WSL2
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.
This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]
Edit: This list is now maintained in the rust-anthology repo.
Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC]
returns the editor to command mode (where you can quit, for example by typing :q!
). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.
:x
Exit, saving changes:q
Exit as long as there have been no changesZZ
Exit and save changes if any have been made:q!
Exit and ignore any changes