PrepOps
Search
Topics
Difficulty
My Progress
Linux
How to create a
new empty file
a file with text (without using text editor)
a file with given size
Difficulty: unrated
Source:
bregman-arie/devops-exercises
by
Arie Bregman
Answer
touch new_file.txt
cat > new_file [enter] submit text; ctrl + d to exit insert mode
truncate -s new_file.txt