UNIX Commands

basic convention used in many UNIX commands:
Ctrl-C            // quit program


man : getting help (manual)
% man man 
% man traceroute


   Space key         // continue scrolling when viewing "man" or using "less"
   b                 // go backward when viewing "man" or using "less"
   q                 // go backward when viewing "man" or using "less"





I will talk about this in future class
ls : list files

  % ls
  % ls -l
  % ls -a

cd : change directory (folder)

  % cd
  % cd ..               // move up one directory (.. means up)
  % cd ~                // move to home ~ means home
  % cd ~/Documents/     // move to Documents folder under home
  % cd ~/Documents/Processing    
  % cd ~/Documents/Processing/   // the final "/" makes it explicit that it is a directory    
  % cd ../../../        // move three directory up
  % cd .                // . means "here" 

pwd : display present working directory


cp : copy file

% cp file1 file2      // copy file1 to file 2
% cp ~/Desktop/test.txt foo.txt
% cp ~/Desktop/test.txt ~/Documents/

mv : move file

% mv file1 file2           // move file1 to file 2
% mv file1 html/lecture/   // move file1 to directory lecture




Other UNIX commands you might want to take a look at
netstat, less, cat, ssh, telnet, sftp, find, gzip, rm, mkdir, rmdir, wc, diff, grep, w, finger, whoami, ps, kill, last...

Some links from the Internet:
Unix Command Summary
Basic UNIX commands
Introduction to Unix commands
Notes