From e4e937715eb01e8d1eebc3d78164e77d3a03a2fb Mon Sep 17 00:00:00 2001 From: Anthony Som Date: Mon, 22 Jan 2018 22:21:48 +0000 Subject: [PATCH] Recommend use of `sudo -v` over `sudo echo` `sudo -v` (or `sudo --validate`) updates the sudo credentials cache without running any commands. It's slightly safer than `sudo echo` under the unlikely chance that `~/.local/bin/echo` (or elsewhere on the PATH) could be set to something malicious. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8223d6c..f851b3a 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ on Linux, you can run ``` bash sync; echo 3 | sudo tee /proc/sys/vm/drop_caches ``` -To use this specific command with Hyperfine, call `sudo echo` to temporarily gain sudo permissions +To use this specific command with Hyperfine, call `sudo -v` to temporarily gain sudo permissions and then call: ``` bash hyperfine --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' 'grep -R TODO *'