Editing Files

Editing text is one of the interesting problems. Most people today are used to "idiot proof" point and click editors like Microsoft Word. There are programs like that for Unix systems, but you need something called an X-Windows Server to use them. Until you get a little further along, you have to use an editor in the console WITHOUT USING THE MOUSE!

Sorry if that caused you a heart attack.

I'm sure this makes me sound like an old timer. But the simple typing skills have paid of handsomely.

The simplest, easiest editor to use on most Unix/Linux systems is called Pico. Pico is a program written by the people who wrote pine, the most famous email reader in Unix. There is a clone called "nano". If you are in a Unix account and you type

$ pico


$ nano

(don't type the dollar sign, that's supposed to remind you of a prompt) then you will see some obvious hints along the bottom. The ^ symbol means the control key. So to "get help" you hold control down and touch the g key. These control key commands need not be capitalized.

To save in pico, hit the ^X key, and give a file name. It refers to the file you have just edited as a "buffer". That's unix talk, don't worry about it.

The oldest and still favorite full screen editor for Unix "vi". I use that all the time because it makes me feel like a codger. I've got a manual that describes some about "vi".

The "Unix experts" use the editor Emacs. That can work with the mouse and menus if you have an X-Server. If you don't, it will still run, but you have to remember lots of keystrokes. I find it difficult to use without a mouse. But if you take some time you can learn. There are versions of Emacs for Windows (EmacsNT, as well as a competitor XEmacs) that I describe below.

There is no escaping the fact that a person who is going to understand how to use a Unix account must be able to use a simple text editor like pico or vi.

There are other alternatives for editing files on a Unix system, of course.

1. Forget about Windows and Mac! Install Linux. It is free, open, and workable, and you won't be a brainless drone anymore. You can edit files directly on your system, or from there you can log into a remote system and run whatever editors they have.

(I had to get that out of my system.)

2. The editor Emacs, which is available for most operating systems, including Windows, has a built-in feature that can "ftp" files to and from a remote Unix system. To open a file or directory on a remote system, you tell it to open a file (type C-x C-f, where C is control key), and then in the command area, you type a slash and your account name, a semi-colon, and, if you want, a file or directory name, as in



The slash at the beginning and the colon after the account name are ABSOLUTELY VITAL. I put the file to open as "aFileName", and if that exists, Emacs will open it, and if it dows not, it will create it. If you put a directory name there, it will start Emacs in is directory mode.

3. If your files are on a Linux/Unix server, you can probably use sshfs to mount a file system.

If you can log into a system with ssh, and if that your system has the sshfs program installed, then you can grab your folder "folder/name/is" from your home on the remote system as easily as

$ mkdir targetdir
$ sshfs whatever.system.name.is:folder/name/is targetdir

Files from "is" will appear under targetdir. Go check:

$ cd targetdir
$ ls

if you just want all your files from your home, leave a blake after the semicolon.

$ sshfs whatever.system.name.is: targetdir

To disconnect from that sshfs attached shared space, type

$ fusermount -u targetdir

4. Windows file servers may allow you access through a protocol called SMB. Linux servers can run "Samba" to emulate that.

5. A file transfer GUI program like ws_ftp, gftp, or Filezilla, is a file transfer program, but it can double as an interface for you to use the Unix system. In its options, you can not only move files, but you can also change their names, permissions, etc. Many of those programs also have a config setting allowing you to designate an editor on your local machine that can be used to open files from the remote system and it will save files back there when you save/close that program.

6. Another option is to install an X-windows server on your pc, and then export the display from your Unix account to your Windows PC. There may be a section on that somewhere else in this document. With that approach, the graphical software on lark will pop upon your system's screen, as if you had a monitor plugged into lark itself.

CRMDA Calendar

Like us on Facebook
One of 34 U.S. public institutions in the prestigious Association of American Universities
44 nationally ranked graduate programs.
—U.S. News & World Report
Top 50 nationwide for size of library collection.
5th nationwide for service to veterans —"Best for Vets: Colleges," Military Times
Equity & Diversity Calendar

KU Today