Cyclades-PC400

Installation Manual

Other commands allow the user to change directories and see the contents of a directory.

pwd

Supplies the name of the current directory. While logged in, the user is always

 

"in" a directory. The default initial directory is the user's home directory,

 

/home/<username>

ls [options] directory_name

Lists the files and directories within directory_name. Some useful options are -l

 

for more detailed output and -a which shows hidden system files.

cd directory_name

Changes the directory to the one specified

cat file_name

Prints the contents of file_name to the screen.

Shortcuts:

. (a dot)

represents the current directory

.. (two dots)

represents one directory above the current directory (i.e. one directory closer to the base

 

directory).

The vi Editor

To edit a file using the vi editor, type

vifile_name

viis a three-state line editor: it has a command mode, a line mode and an editing mode. If in doubt as to which

mode you are in, press the <ESC> key which will bring you to the command mode.

Mode

What is done there

How to Get There

command mode

navigation within the open file

Press the <ESC> key.

editing mode

text editing

See list of editing commands below.

line mode

file saving, opening, etc. exiting

From the command mode, type ":" (the

 

from vi

colon).

Entering the program, the user is automatically in the command mode. To navigate to the part of the file to be

Appendix A - Linux

35

Page 35
Image 35
Cyclades PC400 installation manual Vi Editor, Vi filename, Mode What is done there How to Get There