Contents:
Methods of Creating Files
File and Directory Names
File and Directory Wildcards
Managing Your Files
Printing Files
You'll usually create a text file with a text editor. An editor lets you add, change, and rearrange text easily. Two common UNIX editors are vi (pronounced "vee-eye") and emacs ("ee-macs").
Neither of those editors has the same features as popular word processing software on personal computers. Instead of being designed for making documents, envelopes, and so on, vi and emacs are very sophisticated, extremely flexible editors for all kinds of text files: programs, email messages, and so on. Many UNIX systems also support easy-to-use word processors. Ask your system administrator what's available. Pico is a simple editor (not word processor) that has been added to many UNIX systems.
Since there are several editor programs, you can choose one you're comfortable with. vi is probably the best choice because almost all UNIX systems have it, but emacs is also widely available. The O'Reilly & Associates books Learning the vi Editor and Learning GNU Emacs cover those editors in detail. If you'll be doing only simple editing, however, pico is a great choice. Although pico is much less powerful than emacs or vi, it's also a lot easier to learn.
You can also create a file by using a UNIX feature called input/output redirection, as Chapter 5, Redirecting I/O , explains. This sends the output of a command directly to a file - to make a new file or make an existing file larger.