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
Shift
key and right-click, then selectOpen PowerShell window here
- (Alternatively, you may open
cmd
and thencd
to 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
+T
for Ubuntu) -
cd
to 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
+Space
to open spotlight search - search for terminal) -
cd
to 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.java
will zipKeyable.java
andStudent.java
intolab05.zip
. -
zip lab05.zip *.java *.jsh
will zip all.java
and.jsh
files.
- e.g.
- In the above steps, instead of
scp plabxxxx@pexxx:* .
, typescp plabxxxx@pexxx:filename.zip .
. This will copy out only the.zip
file you created. - In your local directory, type
unzip filename.zip
to 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
.bat
for 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 youcd
to (or placed your script file)