Skip to content

Instantly share code, notes, and snippets.

@bchase
Created June 22, 2017 20:28
Show Gist options
  • Select an option

  • Save bchase/d9d9e3e10c2fb8fc370041041caf29a1 to your computer and use it in GitHub Desktop.

Select an option

Save bchase/d9d9e3e10c2fb8fc370041041caf29a1 to your computer and use it in GitHub Desktop.
$ echo '#!/usr/bin/env ruby\n\nputs "hello, /usr/bin"'> foo
$ chmod +x foo
$ ./foo
hello, /usr/bin
$ foo
zsh: command not found: foo
$ cp foo /usr/bin
cp: cannot create regular file ‘/usr/bin/foo’: Permission denied
$ sudo cp foo /usr/bin
$ foo
hello, /usr/bin
$ sudo rm /usr/bin/foo
$ foo
zsh: command not found: foo
@bchase
Copy link
Copy Markdown
Author

bchase commented Jun 22, 2017

$ echo $PATH | grep "/usr/bin"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment