@@ -77,10 +77,10 @@ tags:
77
77
78
78
Tips
79
79
80
- - Create 1000 files REMOTELY in a directory with name ``many_files``
80
+ - Be in the ``transfer`` directory (or similar) and create 3000 (empty) files REMOTELY in a directory with name ``many_files``
81
81
- ``$ mkdir many_files``
82
82
- ``$ cd many_files``
83
- - ``$ touch my-file-{1..1000 }.txt``
83
+ - ``$ touch my-file-{1..3000 }.txt``
84
84
- Time the download of the directory, using ``time``, and the recursive option to include the files within the directory
85
85
- ``time scp ...``.
86
86
@@ -90,54 +90,64 @@ tags:
90
90
91
91
- [Video for Tetralith](https://youtu.be/Q5fOpHetgcU)
92
92
93
- ???- question "(Optional) Exercise 2: Download the Compressed directory "
93
+ ???- question "(Optional) Exercise 2: Test the difference between transferring one or several files (using scp) "
94
94
95
95
Tips
96
96
97
- - Archive and zip the many_files directory
98
- - Time the download of the compressed directory, using ``time``.
97
+ - Archive the many_files directory
98
+ - The original directory is still there! Check!
99
+
100
+ - Time the download of the original directory, using ``time scp ...``.
101
+ - If ``time`` does not work, count the seconds!
102
+
103
+ - Time the download of the compressed directory, using ``time scp ...``.
99
104
- If ``time`` does not work, count the seconds!
100
105
106
+ - Focus on the ``user`` line, because ``real`` includes the time for establishing connection and giving the credentials!
107
+ - Do you spott any difference?
101
108
102
109
???- tip "Answer (Tetralith example)"
103
110
104
- Archiving and compressions step on REMOTE
111
+ Archiving and step on REMOTE
105
112
106
- - ``tar -cvzf many_files.tar.gz many_files``
113
+ - ``tar -cvf many_files.tar many_files``
114
+ - The original directory is still there! Check!
107
115
108
116
LOCALLY
109
117
110
- - ``time scp [email protected] :~/test/many_files.tar.gz .``
118
+ - ``time scp -r [email protected] :~/transfer/many_files .`` - note the ``-r`` for recursive and including files in the folder.
119
+ - ``time scp [email protected] :~/transfer/many_files.tar .``
111
120
112
121
- [Video for Tetralith](https://youtu.be/UPnbnfTYHAQ)
113
122
114
123
115
- ???- question "(Optional): Exercise 3: Test the difference between transferring one or several files"
124
+ ???- question "(Optional): Exercise 3: Test the difference between transferring one or several files (using SFTP) "
116
125
117
126
Tips
118
127
119
128
In an SSH session (not SFTP) with REMOTE/server
120
129
121
- - Create 1000 files REMOTELY in a directory with name ``many_files``
122
- - ``$ mkdir many_files_sftp ``
130
+ - To not interfer with last exercise make a new folder by creating 3000 files REMOTELY in a directory with name ``many_files``
131
+ - ``$ mkdir many_files ``
123
132
- ``$ cd many_files_sftp``
124
- - ``$ touch file_{1..1000 }.txt``
133
+ - ``$ touch file_{1..3000 }.txt``
125
134
- Check content: ``$ ls`` for checking
126
135
- Leave directory to be able to perform next step: ``$ cd ..``
127
- - Also archive and zip the ``many_files_sftp`` folder to ``many_files_sftp.tar.qz``
136
+ - Also archive the ``many_files_sftp`` folder to ``many_files_sftp.tar``
137
+ - The original directory is still there! Check!
128
138
129
- Establish the SFTP session (Exercise 1)
139
+ Establish the SFTP session (Exercise 1 in SFT session )
130
140
131
141
- Download (to local) the *directory* and note the time needed
132
142
(not shown in numbers so ** count the seconds!** )
133
- - Download (to local) the `` .tar.gz `` file and note the time needed
143
+ - Download (to local) the `` .tar `` file and note the time needed
134
144
- Was there a significant difference?
135
145
136
146
???- tip "Answer (Example with Tetralith)"
137
147
138
148
Archiving and compressions step REMOTELY
139
149
140
- - ``tar -cvzf many_files_sftp.tar.gz many_files``
150
+ - ``tar -cvf many_files_sftp.tar many_files``
141
151
142
152
Establish SFTP connection
143
153
0 commit comments