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

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