Difference between revisions of "Linux Cheat Sheet"

From
Jump to: navigation, search
Line 1: Line 1:
 
This Page is for a Cheat Sheet of Linux commands.
 
This Page is for a Cheat Sheet of Linux commands.
  
Overwrite File with specific content/string:
+
 
 +
== Overwrite File with specific content/string: ==
  
 
''echo "<string>" > <filename>''
 
''echo "<string>" > <filename>''
 +
''printf "<string>"" > <filename>''
 +
 +
Beispiel:
 +
''echo "hello" > beispiel.txt''
 +
''printf "hello" > beispiel.txt''
 +
 +
== Append File with specific content/string: ==
 +
 +
''echo "<string>" >> <filename>''
 +
''printf "<string>"" >> <filename>''
 +
 +
Beispiel:
 +
''echo "hello" >> beispiel.txt''
 +
''printf "hello" >> beispiel.txt''

Revision as of 08:00, 29 January 2025

This Page is for a Cheat Sheet of Linux commands.


Overwrite File with specific content/string:

echo "<string>" > <filename> printf "<string>"" > <filename>

Beispiel: echo "hello" > beispiel.txt printf "hello" > beispiel.txt

Append File with specific content/string:

echo "<string>" >> <filename> printf "<string>"" >> <filename>

Beispiel: echo "hello" >> beispiel.txt printf "hello" >> beispiel.txt