| Topic |
If you want to ... |
... type this command: |
| BASICS |
display a calendar |
cal [month] [year]
e.g.
cal 6 1992
OR
cal 1947
OR
cal
|
| Remote access to a server |
telnet server_address
e.g.
telnet et791.ni.utoledo.edu |
| Transfer files from one server to the other |
ftp server_address
e.g.
ftp et791.ni.utoledo.edu |
| display or set the time and date |
date |
| Topic |
If you want to ... |
... type this command: |
| DIRECTORIES |
display the present working directory (current directory) |
pwd |
| move from the current directory to the system root directory |
cd / |
| move to a different directory |
cd directory_name |
| move up one directory level |
cd .. |
| move up two directory levels |
cd ../.. |
| move to an adjacent directory |
cd ../directory_name |
| return to your login (or home) directory |
cd $home |
| make a sub-directory in your current directory |
mkdir new_directory_name |
| remove an empty sub-directory from the current directory |
rmdir directory_name |
| remove a directory, all sub-directories and all the files contained within them
(USE WITH CAUTION !) |
rm -r directory_name |
| Topic |
If you want to ... |
... type this command: |
| FILES |
list all files contained in the current directory |
ls |
| list all files in the current directory which have the extension cpp |
ls *.cpp |
| list all files, including hidden ones (such as a .forward or a
.signature file) |
ls -a |
| list details of all files including permissions |
ls -l (file permissions [d = directory, r = read, w =
write, x = executable], links present for a directory, logonid, size, date,
time/year, filename) |
| list details of all files (as above) plus any hidden files |
ls -la |
| list the contents of a text file (one page at a time) |
more filename (text will display one screen at a time, press the
spacebar to see the next page, return key to read next line,q to quit and b to go back one
page.) |
| list the contents of a text file (one page at a time) |
less filename (text will display one screen at a time, press the
spacebar to see the next page, press the letter b to review previous screen.less works in
much the same way as more but allows additional options(basically those of the vi editor)
Most people prefer "less" to "more") |
| list the contents of a text file (without control over screen scrolling) |
cat filename |
| copy a file |
cp sourcefile destinationfile |
| rename a file |
mv oldfile newfile |
| move a file |
mv file.ext subdir/file.ext |
| delete a file |
rm filename in response to filename? type y |
| edit a file using vi |
vi filename |
| edit a file using pico |
pico filename pico is the recommended full-screen editor for C++
programs |
| locate a file of your own, display its path or alias |
which filename (shows an alias if applicable or the location of the
file if it is located in a directory found in the current path) [first found instance of filename] |
| locate a file (system or your own), and display its path |
find path -name file -print (searches for all instances of the
file as named, starting at the location specified in path, working its way down the
directories until all the subdirectories have been searched) |
| locate a file on the path from the current directory, and display its location |
whereis filename (searches for filename, a system executable file,
beginning in the current directory and its subdirectories) |
| Topic |
If you want to ... |
... type this command: |
| HELP |
use the on-line help manual |
man command (eg: man ls displays pages for the list command) |
| get help on using the online help manual |
man man |
| display commands containing a keyword |
man -k keyword (eg: man -k quota displays all commands with the
keyword QUOTA) |
| Topic |
If you want to ... |
... type this command: |
| LOGON ID |
find a login id for a particular person(s) with a common name |
whois surname |
| find a login id for a particular person |
finger surname |
| list all people currently logged in |
finger |
| list all people currently logged in |
w |
| Topic |
If you want to ... |
... type this command: |
| COMMUNICATION |
ask for a talk session with someone currently logged in |
talk login_id |
| send an email message to someone |
mail login_id
OR
mail email_addr |
| test a communication path |
ping hostname
OR
ping IP_addr |