Copying Files From PE Nodes - nus-cs2030/2122-s1 GitHub Wiki
To easily copy your files from the PE Nodes to your personal computer at the end of the lab session.
Windows
- Using
Windows Explorer, go the the directory you want your files to be copied to - Hold
Shiftkey and right-click, then selectOpen PowerShell window here - (Alternatively, you may open
cmdand thencdto the desired directory) - Type
scp plabxxxx@pexxx:* .(please fill in the xxx according to your account slip) and pressEnter - When prompted, enter your password for your PE Nodes (refer to account slip again)
- Done! All files are copied form PE Nodes to your computer
UNIX/Linux
- Open your terminal (
Ctrl+Alt+Tfor Ubuntu) -
cdto the directory you want your files to be copied to - Type
scp plabxxxx@pexxx:* .(please fill in the xxx according to your account slip) and pressEnter - When prompted, enter your password for your PE Nodes (refer to account slip again)
- Done! All files are copied form PE nodes to your computer
Mac
- Open your terminal (
Ctrl+Spaceto open spotlight search - search for terminal) -
cdto the directory you want your files to be copied to - Type
scp plabxxxx@pexxx:* .(please fill in the xxx according to your account slip) and pressEnter - When prompted, enter your password for your PE Nodes (refer to account slip again)
- Done! All files are copied form PE nodes to your computer
Copying out Specific Files
- Zip the files you want to copy out with
zip filename.zip <files>- e.g.
zip lab05.zip Keyable.java Student.javawill zipKeyable.javaandStudent.javaintolab05.zip. -
zip lab05.zip *.java *.jshwill zip all.javaand.jshfiles.
- e.g.
- In the above steps, instead of
scp plabxxxx@pexxx:* ., typescp plabxxxx@pexxx:filename.zip .. This will copy out only the.zipfile you created. - In your local directory, type
unzip filename.zipto unzip the files.
- You used some kind of terminal to SSH into the PE Nodes
- (Untested for other methods of acessing PE Nodes)
- Contributions are welcomed, especially in the Mac section.
- Mac users may attempt to adapt this method for their OS, since the logic should be similar.
Tips for advanced users
- Lazy to type? Create your own script file (like
.batfor Windows) - You can also modify the command to
scp plabxxxx@pexxx:* ./<Labxx>/where<Labxx>is basically according to file structure you have on your PC. Path is relative to where youcdto (or placed your script file)