Caldera Systems, Inc.






 



TABLE OF CONTENTS
Ch 1: Introducing OpenLinux eDesktop 2.4
Ch 2: Quick Install
Ch 3: Installation in Depth
Ch 4: Post-Installation Tasks
Ch 5: Reconfiguring X Windows
Ch 6: KDE Graphical Desktop
Ch 7: Command Line Operations
Ch 8: Connecting to the Internet via Your ISP
Ch 9: Laptops
Ch 10: Using Webmin
Ch 11: Connecting to Your Network (LAN)
Ch 12: Installing New Software
Ch 13: System Administration
Ch 14: Troubleshooting Problems
Ch 15: Getting Technical Support

APPENDICES:
A: OpenLinux Boot Parameters
B: eDesktop 2.4 Directory Structure
C: Common Linux Commands
D: KDE Applications and Applets
E: KDE FAQs
F: KDE Keyboard and Mouse Shortcuts
G: Cameleo Light
H: Citrix ICA UNIX Client Quick Reference
I: Moneydance
J: NetWare Client
K: StarOffice Shortcuts







Chapter 7

Command Line Operations

Introduction

Basic Operations

Configuration Commands

System Tools

less and the vi Editor

    less is a text file reader for use at the console or virtual terminal. Its usage is simple: enter less followed by the name of the file you wish to read. Use the up and down arrow keys to move through the file. If you wish to scroll through a long file more quickly, use the Page Up and Page Down keys.

    To exit the less file reader, type q and press the Enter key.

    less can be used in conjunction with the locate command and the pipe character ( | ) to produce easily read output, very useful when the locate command alone produces too many lines of output to be read at a regular terminal. As an example, when trying to find a file with the name of netscape in it, the locate command will produce an output that scrolls past several screens. To better examine the output, enter:

      locate netscape| less

    vi is a text file editor—one of the oldest around. It is a far cry from editors designed for use in a graphical user environment. However, it is fast, and very easy-to-read at a terminal.

    vi has two modes: input and command. The editor starts up in the command mode, and enters the input mode when the user presses the Escape key. To reenter command mode, press the Escape key again. An example will make this clearer.

    To create and edit a file named 'test', enter:

      vi test

    The screen should appear completely blank, save for a column of tildes on the left-hand side, and at the lower left-hand corner the words: "test" [New File]. The user is now in command mode. To enter input mode, press the Escape key. You should hear a beep—confirmation that the mode has changed.

    The input mode is used to edit the file. To insert a line, press the i key. The word INSERT should appear at the bottom of the screen. At this point text can be entered or deleted in much the same way as in any text editor. Enter a line of text. To save it, leave the input mode by pressing the Escape key again, and save the file by pressing the colon key, then w (for write), and the Enter key.

    To leave the editor, press the colon key again, then q and Enter.

    The table below summarizes some of the most common vi commands.

    Table 7-2 Common Commands in the vi Editor
     
    Command Result
    vi (file name) Starts the vi editor and opens the file.
    Escape key Switches mode—the first time, from command mode to input mode.
    i Inserts text from within input mode.
    x Deletes text from within command mode.
    dd Deletes a line from within command mode.
    u reverses the change from within command mode.
    :w and Enter Writes a file in command mode.
    :q and Enter Quits the editor in command mode.

The Internet at the Command Line

    The Internet at the command line is generally faster than it is within X Windows, or any other graphical user interface. Two common Internet programs which are often used to take advantage of this extra speed are Lynx and ftp.

    Lynx is a text-only Web-browser. It is completely command line oriented, using only the keyboard for control and navigation. As an example of how to use this program, connect to the Internet, and at the command line enter:

      lynx www.calderasystems.com

    Within moments a screen similar to Figure 7-8 should appear.

    Figure 7-8 www.calderasystems.com From Within Lynx

    The instructions at the bottom of the screen direct the user to use the Up and Down arrow keys to move through the document. Moving in this way down to the next page, and pressing Enter when the link for OpenLinux 2.3 is highlighted, takes you to the full-text Web page shown in Figure 7-9.

    This is not only considerably faster than a graphical Web-browser, it can also be easier to read at a console.

    Figure 7-9 A Full Text Screen in Lynx

    Ftp, or File Transport Protocol, is a method used to transfer files across the Internet. Most users will have used this protocol at one time or another while downloading files onto their computers from within their Web browsers. However, ftp can be used at the command line without graphical overhead, and run in the background, even allowing further Web-browsing in the foreground while the file downloads.

    The one disadvantage of ftp at the command line is navigation. Moving through a foreign directory tree can be frustrating and tedious. It is best to use this method of downloading—and uploading—files, when you know exactly where the file in question is coming from or going to.

    A sample ftp session could be launched to retrieve the most recent version of a screen saver named xsnow. First, establish an Internet connection, then enter:

      ftp sunsite.unc.edu

    When asked to login, enter the login: anonymous. When asked for a password, enter your e-mail address.

    Navigation commands during an ftp session are very similar to the normal navigation commands at a regular command prompt. The xsnow.rpm file resides three directories down; to reach it enter:

      cd /pub/linux/games

    To check that the file is still there, use the ls command. To download it, enter:

      get xsnow.rpm

    When finished, close the ftp connection by typing: exit. Note that this closes the ftp connection; it does not close your Internet connection.

    NOTE: For a list of the most commonly used Linux commands, see Appendix D.


Copyright © 2000 Caldera Systems, Inc. All rights reserved   Legal Notice | Privacy Notice