Difference between revisions of "Linux Cheat Sheet"
| Line 6: | Line 6: | ||
''echo "<string>" > <filename>'' | ''echo "<string>" > <filename>'' | ||
| − | ''printf "<string> | + | ''printf "<string>" > <filename>'' |
==== Example: ==== | ==== Example: ==== | ||
''echo "hello" > beispiel.txt'' | ''echo "hello" > beispiel.txt'' | ||
Revision as of 08:02, 29 January 2025
This Page is for a Cheat Sheet of Linux commands.
Contents
Overwrite File with specific content/string:
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