‘undo’ ssh-add

  • List all available keys.
  • Remove a key.
  • List all available keys.

sort a Set

Q: How to sort an instance of java.util.Set?


See a more detailed explanation here.

change file encoding recursively

Good: Bad: The second one will only work if find will not descend into sub directories, since the directory tree inside of converted will not be created on demand, as it would be the case e.g. for mkdir -p. The result will be a ‘file or directory not found’ error.

mv: do not override destination file that is newer than source file (update move)

mv does not support the update option, unlike rsync and cp. If your version of coreutils does support it, using cp (followed by rm) is the easiest way to perform an update move operation:

Install Oracle Java 8

count words in a PDF file

Exemplary output: tr -d '.' removes single dots (such as from the TOC).