Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Files and File systems

First, let's review Intro Unix: Files and File Systems from the Intro Unix course. The most important takeaways are:

...

Working with remote files

The cp command only copies files/directories with the local host's file systems. The scp command is similar to cp, but scp lets you securely copy files from one machine to another. And also like cp, scp has a -r (to/from a remote computer)recursive) option to copy directories.

scp usage is similar to cp in that it copies from a <source> to a <destination>, but uses remote machine addressing to qualify either the <source> or the <destination> but not both. Remote machine addressing looks like this: <user_account>@<host>:<source_or_destination>

Examples: 

Open a new Terminal (Mac) or Command Prompt (Window) window on your local computer (not logged in to your student account), and try the following, using your studentNN account and GSAF pod host:

Code Block
languagebash
titlescp a single file
# On your local computer - not gsafcomp01 or gsafcomp02

# copy "haiku.txt" from your remote student Home directory to your current local directory
scp student01@gsafcomp01.ccbb.utexas.edu:~/haiku.txt . 

# copy "haiku.txt", now in your local current directory, to your remote student 
# Home directory with the name "haiku2.txt"
scp ./haiku.txt student01@gsafcomp01.ccbb.utexas.edu:~/haiku2.txt


Code Block
languagebash
titlescp a directory
# On your local computer - not gsafcomp01 or gsafcomp02

# copy the "docs" directory and its contents from your remote student Home directory 
# to a local sub-directory called "local_docs"
scp -r student26@gsafcomp02.ccbb.utexas.edu:~/docs/ ./local_docs/

# copy "haiku.txt", now in your local current directory, to your remote student 
# Home directory with the name "haiku2.txt"
scp ./haiku.txt student26@gsafcomp02.ccbb.utexas.edu:~/haiku2.txt


rsync

wget

The find command

...