Learning the Unix Operating System

Learning the Unix Operating SystemSearch this book
Previous: 3.6 Customizing Your AccountChapter 4Next: 4.2 File and Directory Names
 

4. File Management

Contents:
Methods of Creating Files
File and Directory Names
File and Directory Wildcards
Managing Your Files
Printing Files

4.1 Methods of Creating 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.


Previous: 3.6 Customizing Your AccountLearning the Unix Operating SystemNext: 4.2 File and Directory Names
3.6 Customizing Your AccountBook Index4.2 File and Directory Names

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System