cat command to write a file code example Example 1: cat create file cat >"filename" Example 2: create cat document ubuntu cat > file1.txt