Connecting

You will have been given a username (tutoxx) and a password. Users tuto01 to tuto10 should connect to the head node cecamsrv4.epfl.ch and users tuto11 to tuto16 should connect to cecampc4.epfl.ch.

Do not run pwscf jobs on the head node! To run jobs we will connect to a specific node (more later). But stay on the head node for this inital tutorial

Let's make the connection

[Student-16:~] che721% ssh -Y tutoxx@cecamsrv4.epfl.ch
Password: 
Password: 
Last login: Mon Sep 21 14:10:03 2009 from 130.60.15.156
Have a lot of fun...

Getting Started

Step 1 - Copying the examples into a working area

Firstly, let's create a temporary working area to do the examples in. This is usually a good idea for every distinct problem you're working on as it keeps things tidy and manageable. We'll create a directory (or "folder" in Windows parlance) called "examples" using the Linux command "mkdir":

user@cecamsrv4:~>mkdir intro

Now check that your intro directory has been made properly by listing the directory (or folder) you are already in:

user@cecamsrv4:~>ls

and you should see a list of files and directories including the new examples directory. Now let's "move" into that directory:

user@cecamsrv4:~>cd intro

Note that "cd" is the Linux command for changing directories. You can move back to your home directory at any time by typing "cd" just on its own. You can check your current directory at anytime with the "pwd command":

user@cecamsrv4:~>pwd

If you run "ls" in the examples directory, nothing is listed as there are no files yet (try it). Let's copy the example code from one directory (provided by the tutors) to your current location. Note the space before the "." :

user@cecamsrv4:~>cp ../gipaw_day1.tgz .

Do NOT forget the "." character. To Linux this means "my current directory". So you are copying (with the "cp" command) the file gipaw_day1.tgz from the directory one below your current position to your current directory. Now try an "ls" to see what you've got. You should see:

user@cecamsrv4:~>ls
gipaw_day1.tgz

This file is an archive containing lots of files and directories. We need to unpack it

user@cecamsrv4:~> tar -zxvf gipaw_day1.tgz

Now when you list the files you should see a directory call 'gipaw_day1'. Move into this directory, and list the files

user@cecamsrv4:~> ls
README ex1     ex2     ex3     ex4

To look at the files you can use the command called more (similar commands are cat and less)

user@cecamsrv4:~> more README

Editing a file

Edit the README file. To do this you will need to use an editor. (for experts 'vi' and 'emacs' are available). Otherwise I suggest using an editor call nano. This has helpful list of instructions are the bottom of the screen (but ask if you are confused!)

user@system:~>nano README

You are now ready to move onto the first tutorial
END of TUTORIAL

Summary of useful commands

mv			rename (or move) a file     	eg 'mv oldfile newfile'
cp 			copy a file 			eg 'mv original copy'
pwd			print current (working) directory
mkdir			make a new directory (aka folder)
nano 			a file editor			eg 'nano filename'
	note you can use this to edit an existing file, or to create a new file. eg 'nano mynewfile' will create a new file called 'mynewfile' 
ls			list files in the current directory
ls -l			list files - but give more details than plain ls
exit			to close the terminal when you are finished

cp fred/* jim/		copy all the files in the folder fred into the folder jim
cp ../myfile ./		copy the file myfile in the folder below to the current folder
cp ~/myfile ./		copy the file myfile in your home folder to the current folder