Created
June 11, 2020 13:35
-
-
Save n00dl3/d011008f283772609daa930023f01a35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:w !sudo tee % | |
# :w = Write a file. | |
# !sudo = Call shell sudo command. | |
# tee = The output of the vi/vim write command is redirected using tee. | |
# % = Triggers the use of the current filename. | |
# Simply put, the ‘tee’ command is run as sudo and follows the vi/vim command on the current filename given. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment