You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _uw-research-computing/transfer-files-computer.md
+39-71
Original file line number
Diff line number
Diff line change
@@ -9,67 +9,63 @@ guide:
9
9
- hpc
10
10
---
11
11
12
+
## Introduction
13
+
This guide shows how to transfer (upload/download) files between a local computer and CHTC's file systems. Two options are presented: the `scp` command line utility, and a file transfer program. Additionally, we present tarballs as a way to transfer multiple files easily.
14
+
12
15
{% capture content %}
13
-
1.[Transferring Files](#transfer)
14
-
-[On the command line](#transfer-scp)
15
-
-[Using an SSH program (Windows/Mac)](#transfer-winscp)
16
-
-[Re-using SSH connections](#transfer-many)
17
-
3.[Creating and Editing Files in CHTC](#files)
16
+
-[Introduction](#introduction)
17
+
-[Before you transfer](#before-you-transfer)
18
+
-[Option 1: Transfer files with the `scp` command line utility](#option-1-transfer-files-with-the-scp-command-line-utility)
19
+
-[Option 2: Transfer files with a file transfer program](#option-2-transfer-files-with-a-file-transfer-program)
20
+
-[Transfer multiple files using tarballs](#transfer-multiple-files-using-tarballs)
21
+
-[Related pages](#related-pages)
18
22
{% endcapture %}
19
23
{% include /components/directory.html title="Table of Contents" %}
20
24
21
-
<aname="transfer"></a>
22
-
23
-
**1. Transferring Files**
24
-
=====================
25
+
## Before you transfer
25
26
26
-
To transfer files to and from CHTC, you will need the same username and
27
-
hostname information for [logging in](#login), as well as understanding
28
-
where your files are and where you would like them to go.
27
+
To transfer files to and from CHTC, you will need:
28
+
* Your username and hostname information for [logging in](connecting)
29
+
* The location on the file system of the files to be transferred (also referred to as the "path")
30
+
* The location on the file system where you'd like to transfer your files to.
31
+
* Basic skills in [navigating file systems](basic-shell-commands#navigate-directories)
29
32
30
33
31
-
<aname="transfer-scp"></a>
32
-
33
-
A. On the command line
34
-
----------------------------------
34
+
## Option 1: Transfer files with the `scp` command line utility
35
35
36
36
On Mac, Linux, or modern Windows (10+) systems, you can use the \"Terminal\" application and
37
37
the `scp` command to copy files between your computer and CHTC servers.
38
38
39
-
**Your computer to CHTC**
39
+
**Upload files from your computer to CHTC**
40
40
41
-
First, open the \"Terminal\" application and navigate to the directory
42
-
with the files or directories you want to transfer. Then, use this
41
+
First, open the \"Terminal\" application and navigate to the directory with the files or directories you want to transfer using the [`cd` command](basic-shell-commands#navigate-directories). Then, use this
43
42
command to copy these files to CHTC:
44
43
45
44
```
46
-
$ scp file username@hostname:/home/username
45
+
scp file username@hostname:/home/username
47
46
```
48
47
{:.term}
49
48
50
49
If you would like these files to end up in a different directory inside
51
50
your home directory, just add it to the path at the end of the command.
52
51
53
-
**CHTC to your computer**
52
+
**Download files from CHTC to your computer**
54
53
55
54
Open the \"Terminal\" application. Do NOT log into CHTC. Instead,
56
55
navigate to where you want the files to go on your computer. Then, use
57
56
this command to copy these files there:
58
57
59
58
```
60
-
$ scp username@hostname:/home/username/file ./
59
+
scp username@hostname:/home/username/file ./
61
60
```
62
61
{:.term}
63
62
64
-
Again, for many files, it will be easiest to create a compressed tarball
63
+
For transferring many files, it will be easiest to create a compressed tarball
65
64
(.tar.gz file) of your files and transfer that instead of each file
66
-
individually.
67
-
65
+
individually.
68
66
69
-
<aname="transfer-winscp"></a>
70
67
71
-
B. Using a file transfer program (Windows/Mac)
72
-
----------------------------------------------
68
+
## Option 2: Transfer files with a file transfer program
73
69
74
70
Windows and Mac users can also use special programs to help them
75
71
transfer files between their computers and CHTC. For Windows, we
@@ -80,60 +76,32 @@ looks like this:
80
76

81
77
82
78
The left window is a directory on your computer, the right window is
83
-
your home directory in CHTC. To move files between the two, simply drag
84
-
and drop.
79
+
your home directory in CHTC. To move files between the two, simply use your mouse to drag
80
+
and drop the files.
85
81
86
-
There are other programs besides WinSCP that do this. Another that works
87
-
on Mac and Windows is called [Cyberduck](https://cyberduck.io).
82
+
Another popular file transfer utility available for Mac and Windows is [Cyberduck](https://cyberduck.io). See our [SSH programs](connecting#ssh-programs) table for a list of similar software.
88
83
89
-
<aname="transfer-many"></a>
90
84
91
-
C. Transferring Multiple Files
92
-
------------------------------
85
+
## Transfer multiple files using tarballs
93
86
94
-
If you are transferring many files, it is advantageous to compress them
95
-
into a single compressed file, in order to facilitate transferring them.
96
-
Place all the files you need in a directory, and then either zip it or
97
-
use the \"tar\" command to compress them:
87
+
If you are transferring many files, we recommend compressing them
88
+
into a single file. Move all the files you need into a separate directory, and use the \"tar\" command to compress them:
98
89
99
90
```
100
-
$ tar czf data_files.tar.gz file_directory/
91
+
tar czf data_files.tar.gz file_directory/
101
92
```
102
93
{:.term}
103
94
104
-
To untar or unzip files on the submit server or head nodes, you can use
105
-
either:
106
-
107
-
```
108
-
[alice@submit]$ tar xzf data_files.tar.gz
109
-
```
110
-
{:.term}
95
+
Afterwards, you may transfer the single tarball file as usual.
111
96
112
-
or
97
+
To untar files, use the tar command again:
113
98
114
-
```
115
-
[alice@submit]$ unzip data_files.zip
99
+
```
100
+
tar xzf data_files.tar.gz
116
101
```
117
102
{:.term}
118
103
119
-
<aname="files"></a>
120
-
121
-
**2. Creating and Editing Files in CHTC**
122
-
=====================================
123
-
124
-
Once you have logged in to a CHTC server, you can edit files from the
125
-
command line, by using a command line file editor. Some common editing
126
-
programs are:
127
-
128
-
- nano
129
-
- vi
130
-
- emacs
131
-
132
-
`nano` is the most beginner-friendly, and `emacs` is the most advanced.
0 commit comments