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