Site icon Learning & Doing

Clear a file using /dev/null

Let’s clear the file contents

$ cat /dev/null > file.txt
Exit mobile version