How to create a file in Linux

How to create a file in Linux

Your page summary goes here.

Create an empty file

touch file.txt

Create a file with text

echo "Some text" > file.txt

Create a file with multiline text

cat <<EOF > file.txt
line1
line2
line3
EOF

Предыдущая запись Следующая запись