Difference between revisions of "Linux Cheat Sheet"
(Created page with "This Page is for a Cheat Sheet of Linux commands. ----") |
(→Append File with specific content/string:) |
||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
| − | + | == 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: == | ||
| + | ==== Command: ==== | ||
| + | ''echo "<string>" >> <filename>'' | ||
| + | |||
| + | ''printf "<string>"" >> <filename>'' | ||
| + | ==== Example: ==== | ||
| + | ''echo "hello" >> beispiel.txt'' | ||
| + | |||
| + | ''printf "hello" >> beispiel.txt'' | ||
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