Difference between revisions of "Linux Cheat Sheet"
(→Overwrite File with specific content/string:) |
(→Append File with specific content/string:) |
||
| Line 13: | Line 13: | ||
== Append File with specific content/string: == | == Append File with specific content/string: == | ||
| − | + | ==== Command: ==== | |
''echo "<string>" >> <filename>'' | ''echo "<string>" >> <filename>'' | ||
Latest revision as of 09:49, 14 April 2025
This Page is for a Cheat Sheet of Linux commands.
Contents
Overwrite File with specific content/string:[edit]
Command:[edit]
echo "<string>" > <filename>
printf "<string>" > <filename>
Example:[edit]
echo "hello" > beispiel.txt
printf "hello" > beispiel.txt
Append File with specific content/string:[edit]
Command:[edit]
echo "<string>" >> <filename>
printf "<string>"" >> <filename>
Example:[edit]
echo "hello" >> beispiel.txt
printf "hello" >> beispiel.txt