On 29.04.2023 02:52, cor...@free.fr wrote:
Hello list,

When I run this command:

$ sudo echo 123 > /root/123.txt


A better use is to do:

echo 123 | sudo tee /root/123.txt

or

sudo tee /root/123.txt <<EOF
123
EOF

If rather adding text to a file then add parameter '-a' to the 'tee' command.

--
Mimiko desu.


--
This email has been checked for viruses by Avast antivirus software.
www.avast.com

Reply via email to