How to clear the pasteboard / find string from the command line?

I want to be able clear out the whatever data is cached in find (command-f) clipboard contents from the command line.

Whatever is in there seems to carry across between applications. This is a clear security risk in some cases.

  • How to secure macOS's clipboard?

Is there a way to do this?


Solution 1:

The magic words seem to be

pbcopy -pboard find < /dev/null