EAS 471: LABS IN ESB 1-39
Transcription
EAS 471: LABS IN ESB 1-39
EAS 471: LABS IN ESB 1-39 The laboratory component for EAS 471 will be held in ESB 1-39 as of March 1, 2011. As the computers in this room do not have MATLAB installed, we will be using this program remotely. The instructions to connect to your new workspace, as well as a basic introduction to linux, are included below. How to login Each student has been given a home directory on the server aragon.eas.ualberta.ca. To connect to your account, please follow the steps listed below. 1. Login in to the computers in ESB 1-39 using your EAS username and password (choose EA_Science in the drop down menu). 2. Open an X terminal (Programs>Cygwin>XWin). 3. Open putty (Programs>Putty>Putty). 4. Under the host name, type aragon.eas.ualberta.ca 5. Under the X11 subheading, check the box to enable X11 forwarding. Hit Enter. 6. Provide your username (the first letter of your first name followed by your last name, without a space) 7. For your first login, provide the temporary password given in class, then type the command “passwd.” This will prompt you for the temporary password and then ask you to choose a new password. Please remember it! 8. You can now open MATLAB by typing “matlab” into the command line. You can also experiment with the command line version of this program (much faster) by opening it with “matlab –nodesktop” Basic Linux commands • man <command> brings up the online help manual for its argument <command> e.g., man ls will bring up the help page for the command ls • ls lists the contents of the current working directory variants: ls -l shows the file size, its permissions and the date the file was created ls -tl same as above but files are ordered from newest to oldest e.g. ls –tl *.f lists all files that end with .f (fortran scripts) in reverse order of creation * is a wildcard ls ../ lists the contents of one directory up from your current directory • pwd gives the current working directory • mkdir <directory name> make a directory called <directory name> • cd <directory> change directory to <directory> e.g. cd ../test change to the directory test that is located one directory up from your current WD cd data/ change to the directory data that is contained in your current WD • rm <file> delete a file. note this is not reversible! e.g. rm advection.f deletes the file advection.f rm -R test/ deletes the directory called test. Note that the –R flag is required to delete a directory but not a file rm -f *.f removes all files that end with .f. note the –f flag removes the files without prompting the user for confirmation, which is useful if you are deleting a large number of files • cp <file1> <file2> copies the preexisting file1 to a new, identical file2 (overwrites file2 if it exists although you will be prompted to agree) • grep <string> <file1> searches for all instances of <string> inside a text file <file1> e.g. grep for advection.f will report all instances of “for” in the fortran script advection.f grep “else if” advection.f will report all instances of “else if.” Note the quotations are needed to search for the string “else if” in the file; otherwise you will search for the string “else” in the file for • touch <new file> creates a new file in your current WD • more <text file> shows the contents of a text file. type <space> to scroll down through the document and <q> to return to the command line Fun stuff • w lists the users that are currently logged in and the tty (controlling terminal) that the user is on • write <user> <tty> starts a chat with <user> in the terminal <tty> Other Linux-related links that may be useful http://www.unixguide.net/linux/linuxshortcuts.shtml http://ss64.com/bash/