Linux Cheat Sheet

From
Revision as of 09:49, 14 April 2025 by 84.179.91.133 (talk) (Append File with specific content/string:)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This Page is for a Cheat Sheet of Linux commands.


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