O'Reilly logo

A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visiting and Saving Files

When you visit (emacs terminology for “call up”) a file, emacs reads it into a buffer (page 242), allows you to edit the buffer, and eventually usually saves the buffer back to the file. The commands discussed here relate to visiting and saving files.

META-x pwdMETA-x cd

Each emacs buffer keeps a record of its default directory (the directory the file was read from or the working directory, if it is a new file) that is prepended to any relative pathname you specify. This convenience is meant to save some typing. Enter META-x pwd to print the default directory for the current buffer or META-x cd to prompt for a new default directory and assign it to this buffer. The next section discusses pathname completion, which you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required