Andy Wang Object Oriented Programming in C++ COP 3330 UNIX Tools Andy Wang Object Oriented Programming in C++ COP 3330
Remote Login SSH Secure Shell Downloading site Click Quick Connect http://www.wm.edu/offices/it/services/software/licensedsof tware/webeditingsftp/sshsecureshell/index.php Click Quick Connect Enter Host name: linprog.cs.fsu.edu Enter User Name, Click Connect Enter Password, Click OK
UNIX Shell Shell First program running in the X-Terminal Window Common shells include csh, bash, and tcsh Three main purposes Interactive use Customization of your UNIX session Programming
UNIX Shell The shell interactively waits for your to type a command at the UNIX prompt awang@linprog1:~> awang is your login linprog is the server name ~ is your home directory To customize your UNIX session Can define variables to specify the location of your home directory, where to find files, etc. Can define start-up files to specify UNIX commands that will be executed for each login session
Common Shell Commands Case sensitive ls lists the contents in the current directory pwd tells you the path of the current directory cd changes to the home directory cd <directory> changes the current directory cd .. Changes to the parent directory mkdir <directory> creates a directory rm <file> removes a file rmdir <directory> removes a directory
Common Shell Commands Case sensitive mv <file1/dir1> <file2/dir2> renames the file or directory cp <file1/dir2> <file1/dir2> copies the file or directory exit exits the shell
Editor Anything goes emacs, pico, nano, vi To run emacs, type emacs at the shell prompt
Online Manual Pages To see a list of commands containing a keyword Type man –k <keyword> a the shell prompt To see the manual pages for a particular command Type man <exact topic> man man man ls
Redirect the output of cat to an output file named file Other Handy Tools Redirect the output of cat to an output file named file cat, more, and grep Type cat > file<enter> Type This is a test.<enter><Ctrl-D> Type more file<enter> alias alias dir ls alias rm (rm –i) alias dog cat alias woman man