Exercise: Create Files (I/O Redirection)

  • Make your home directory your current working diretory (“Change into your home directory”)

  • From there, fill the directory hierarchy from Exercise: mkdir with files

    • Create a file hello in the parent directory, containing a single line, hello sweetheart

    • Create a file business-card in the child directory, containing four lines

      • Your first name

      • Your last name

      • Your street (including number)

      • Your ZIP code and city

Hint

You use the >> operator to append a line to an existing file (or to create that file if it doesn’t exist:

$ echo 8020 Graz >> somefile.txt