Command Form: >
Use
printf 'hello makers\n' > ~/playground/hi.txt
What It Does
> sends stdout to a file, replacing that file if it already exists.
Practice
printf 'first\n' > ~/playground/hi.txt
printf 'second\n' > ~/playground/hi.txt
cat ~/playground/hi.txt
Only second remains because > overwrites.
Watch Out
Use >> when previous content must survive. Use 2> for stderr.

Linux Foundations