link to content
Essentials at NC State Home
Help | ResNet | Computing@NC State | For OIT Staff | Publications | Search NC State | Feedback
your unity account
antivirus & security
email & messaging
connections & labs
your computer
software@nc state
files
web pages
education & training
publications
other resources
troubleshooting
ITD Sections

Creating and Saving a New PICO File

Entering text

At the system prompt, enter:

pico

You should see PICO in your XTerm window.

The top line of your screen is called the status line. It shows

  • The version of PICO you are using,
  • The file name. Yours probably says New Buffer because you haven't named it yet.
  • Whether or not you have made changes. If you've entered anything into this blank file and haven't saved the changes, Modified will appear in the upper right corner of the Pico screen.

At the bottom of the screen are two lines showing the commands available for your use.

Now that you have an empty file, you can start typing. PICO automatically starts a new line when you run out of room (called "wrapping text," "text wrap," or "autowrap"), so you don't need to watch the screen while you type.

Press the Return key when you want to start a new line. If you want a blank line between lines of text or data, press it twice.

Trying it out: Entering text

Go ahead and enter the following text in the new file you created so you can get some practice typing in PICO and so you'll have something to edit later in this tutorial:

Mary had a little lamb, its fleece was white as snow, and everywhere that Mary went the lamb was sure to go.

It followed her to school one week
to see what it could find,
it then learned French so well
it blew little Mary's mind.

Saving the file

Now that you have a file with something in it, this is a good time to save your work. You should save your files often, if for no other reason than strange things can happen. The common sense rule is to save often enough so that if you lose your work you won't have much to re-do. Most people recommend saving every 15 minutes.

To save a file, press ^o, which stands for writeOut because you're writing what you've done to a file as output. Pico will prompt you for the file name. If the file doesn't have a name yet, you'll need to type one in. If the file does have a name, it will follow the file name prompt, and all you need to do is press the Return key.

You may also save the file during the process of quitting PICO. Ctrl-x quits PICO after prompting you to save the file. Press Y to save the file. Pressing N will return the file to the state it was in the last time you saved it (if you hadn't saved during this editing session, the file will return to the state it was in when you opened it). If you alter a file and want to save the original version as well as the modified version, enter Y to save the file. When you are prompted for a file name enter a new file name.

Trying it out: Saving the file

  1. Press ^o.
  2. When prompted for the file name, type

    mary_lamb.txt

    and then press the Return key.
  3. On the line just above the list of commands, Pico will tell you how many lines it saved. In this example, you'll probably see

    Wrote 9 lines

Go to the PICO tutorial main page.

 

Last modified July 20, 2004 by cawalker  

jump to content
jump to content Go to page top Page Top | OIT | PolicyDisclaimer