Tip for Desktop Memory management, new vm tuning option
Ralf Mardorf
silver.bullet at zoho.com
Tue Jul 30 19:54:00 UTC 2019
On Tue, 30 Jul 2019 15:27:35 -0400, Ken D'Ambrosio wrote:
>I, for one, always forget the damn syntax for 'tee', so I cheat:
>sudo bash -c "echo foo > bar"
There's nothing to remember ;).
I also don't know how to append text, but I just need 'tee' to
overwrite, so no option is needed at all.
To replace '>' just '| sudo tee' is needed.
However, replacing ">>" is just one 'help' away, it's '| sudo tee -a'.
$ tee --help | grep append
-a, --append append to the given FILEs, do not overwrite
$ echo "hello" > world.txt
$ cat world.txt
hello
$ echo "world" | tee -a world.txt
world
$ cat world.txt
hello
world
$ echo "overwrite" | tee world.txt
overwrite
$ cat world.txt
overwrite
More information about the ubuntu-users
mailing list