.. index:: cat .. _cat: Creating a File ---------------- :t:`Linux for Programmers and Users`, Section 3.13. Files may be created in several ways. The easiest is perhaps with the :command:`cat` command. :: $ cat > myfile This is an example of how to use the cat command to add plain text to a file. Others ways to create a text file are to use a text editor such as :command:`vi` or :command:`nano`. If we are content with an empty file, the :command:`touch` command also creates a file. Viewing the Contents of Files ------------------------------ Three programs often used to view the contents of files: :command:`cat`, :command:`more`, and :command:`less`. The later two are also refered to as *pagers* because they display the contents of a long file in a screen-by-screen manner. See also :ref:`view`. .. index:: cat .. program:: cat .. describe:: cat Concatenate FILE(s), or standard input, to standard output. SYNOPSIS :command:`cat` [OPTION] [FILE] ... .. cmdoption:: -n, --number number all output lines. .. cmdoption:: -s, --squeece-blank never more than one single blank line .. cmdoption:: -t equivalent to `-vT` .. cmdoption:: -T, --show-tabs display TAB characters as ^I .. cmdoption:: -v, --show-nonprinting use ^ and M- notation, except for TAB to display nonprinting characters