redirect >

Write command output to a file (overwrite)

redirects stdout to a file, creating it if it doesn't exist and overwriting if it does. Use with care; the > on the wrong file can wipe important data instantly.

Example

$ echo 'server_started' > /tmp/status.txt
Tip: Type it yourself in the terminal below - reading is not the same as doing.