• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Using Basic Unix Commands > Creating and Editing Files with Pico

Creating and Editing Files with Pico

Pico is a full-screen UNIX text editor. Although it doesn't operate much differently than TextEdit, it contains features that help you work with UNIX based code. The Pico text editor lets you create and edit any type of text file. In addition, you can use Pico to change your account configuration files or write a computer program source code file. For example, to create a file and name it accounting.txt, type pico accounting.txt. If the file already exits, Pico opens it for you; if it doesn't exist, Pico creates it. Pico displays a menu bar of commonly used commands at the bottom of the window. Pico accepts commands from your keyboard only, and not from your mouse.

Create and Edit Files with Pico

Open the Applications folder, double-click the Utilities folder, and then double-click the Terminal icon.

Type pico filename.ext, and then press Return.

UNIX retrieves the file for editing or if it can't find the name, creates a new file.

In our example, UNIX opens the file OSX13_A1.doc.

Make your changes using the command keys at the bottom of the window.

To save the file, press Control+O.

Pico displays the current file name. (To save the file under a different name, delete the filename that Pico displays and type a new one).

To Exit pico, press Control+X.

Click the Close button.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint