next up previous contents
Next: Text editors Up: Contents Previous: Email

Overview

Here is a summary of all the commands you have learned so far and some additional commands that are useful.

echoecho arguments
pwd return working directory name
cd [ dir ]change working directory
ls list names of all files (except hidden files)
in current directory
ls [ file ...] list only named files
ls -a list all files including hidden files
(i.e. those starting with ``.'')
ls -t list in time order, most recent first
ls -l list files in long format
ls -u list by time last used
ls -r list in reverse order, good in combination with -t etc.
mkdir dir make directory dir
rmdir dir remove directory dir (dir has to be empty)
cp source dest copy source to dest
mv source dest move source to dest
rm [ file ...] remove named files
cat [ file ...] print contents of named files to stdout
more [ file ...] print of files one page at a time
wc [ file ...] count lines, words and characters for each file
grep pattern [ files ...] Search for a pattern in a file
sort [ file ...] sort the files alphabetically by line
head [ -n ] file print the first n lines of file
tail [ -n ] file print the last n lines of file
cmp file1 file2 print location of first difference between file1 and file2
diff file1 file2 print all differences between file1 and file2
man command display help (man page) on command
chmod ugoa±rwx file change the permissions mode of a file
telnet host connect with the machine named host
finger check who is logged into your machine
finger @host check who is logged into machine named host
elm check if you got mail and read it
elm user send an email to user
> fileredirect the output to file
>> fileappend the output to file
>& fileredirect the output as well as the error to file
< filetake the input from file

Unix provides manual pages for the various commands. To access the manual pages and read a description of what a command is doing you can use the command man (see also section 1.10). For example to learn about the text editor vi type man vi

> man vi
vi(1)                                                                    vi(1)



NAME
     vi, view, vedit - screen-oriented (visual) display editors based on ex

SYNOPSIS
     vi [-t tag] [-r file] [-L] [-wn] [-R] [-x] [-C] [-c command] file ...
     view [-t tag] [-r file] [-L] [-wn] [-R] [-x] [-C] [-c command] file ...
     vedit [-t tag] [-r file] [-L] [-wn] [-R] [-x] [-C] [-c command] file ...

DESCRIPTION
     vi (visual) is a display-oriented text editor based on an underlying line
     editor ex(1).  It is possible to use the command mode of ex from within
     vi and vice-versa.  The visual commands are described on this manual
     page; how to set options (like automatically numbering lines and
     automatically starting a new output line when you type carriage return)
     and all ex line editor commands are described on the ex(1) reference
     page.
:

To contiunous viewing the manual pages type enter. To quit type q


next up previous contents
Next: Text editors Up: Contents Previous: Email

Johan van der Zwan
Tue Apr 13 14:28:49 WEST 1999