Example of Commands pwd --- show your current directory This is
home of venus, not your home directory Tilde: means you are in your
home directory Account dzhangs home directory
Slide 3
Example of Commands If you move up beyond your home directory,
you may not have permission to view the files.
Slide 4
If you see something like this, one reason might be that you
are trying to vi a file beyond your home directory To fix this,
press q (for Quit)
Slide 5
Example of Commands mkdir dirname --- make a new directory
dirname cd dirname --- change directory to dirname ls --- list your
files in current directory
Slide 6
cd --- go to your home directory cd.. --- move up one directory
in the hierarchy This is your home directory Example of
Commands
Slide 7
Example of Hello.cpp Create file Hello.cpp using command touch
Then use command vi to edit Hello.cpp
Slide 8
Command Mode To switch from Command Mode to Insert Mode, press
i
Slide 9
Insert Mode To switch from Insert Mode to Command Mode, press
ESC
Slide 10
Write the program in Insert Mode
Slide 11
Go to Command Mode, then save the program using :wq :wq This
is
Slide 12
vi Editor in Command Mode: :wq --- save the file and quit vi :q
--- quit vi when the file has not been modified :q! --- disregard
any modification and quit vi
Slide 13
Compile Hello.cpp Compile Command is g++ If you get an error
here, it means there is something wrong with your code. You should
go back to check your code using vi Hello.cpp You should see
this
Slide 14
Run Program Run Command is ./a.out
Slide 15
Example of SSH Secure File Transfer Client Desktop Icon
Slide 16
Log in to venus.cs.qc.cuny.edu Left Pane: LocalRight Pane:
Venus
Slide 17
Upload and Download Files Log in to venus.cs.qc.cuny.edu To
upload a file from your Windows pc to Venus, drag the file from the
left pane to the right pane To download a file from Venus to your
Windows pc, drag the file from the right pane to the left pane
Slide 18
More Command Examples rm -r dirname --- removes the directory
dirname and all files in it rmdir dirname --- removes an empty
directory dirname
Slide 19
More Command Examples cp --- copy a file e.g. to copy file
Hello.cpp to directory folder1
Slide 20
More Command Examples cp -r --- copy all files in a directory
e.g. to copy all the files in directory folder1 to directory
folder2 exit --- to exit Venus
Slide 21
If You Use Mac No need to download SSH Secure Shell Client Go
to Terminal Login in to Venus using ssh
Slide 22
Mac File Upload and Download Upload a file upload.txt from Mac
desktop to Venus account directory CS111 Download a file Hello.cpp
from Venus account directory CS111 to Mac desktop