Skip to content

Instantly share code, notes, and snippets.

@lanrion
Created April 22, 2014 02:11
Show Gist options
  • Save lanrion/11163168 to your computer and use it in GitHub Desktop.
Save lanrion/11163168 to your computer and use it in GitHub Desktop.
sudo tee
sudo tee
Usage: tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.
-a, --append append to the given FILEs, do not overwrite
-i, --ignore-interrupts ignore interrupt signals
--help display this help and exit
比如:
echo 'export PATH=~/dev/ruby19/bin:$PATH' | sudo tee -a /etc/profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment