Skip to content

Commit ef4f176

Browse files
authored
tips fix archiving exercise errors
1 parent bd99629 commit ef4f176

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

docs/sessions/transfer_tips/README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ tags:
7777

7878
Tips
7979

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``
8181
- ``$ mkdir many_files``
8282
- ``$ cd many_files``
83-
- ``$ touch my-file-{1..1000}.txt``
83+
- ``$ touch my-file-{1..3000}.txt``
8484
- Time the download of the directory, using ``time``, and the recursive option to include the files within the directory
8585
- ``time scp ...``.
8686

@@ -90,54 +90,64 @@ tags:
9090

9191
- [Video for Tetralith](https://youtu.be/Q5fOpHetgcU)
9292

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)"
9494

9595
Tips
9696

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 ...``.
99104
- If ``time`` does not work, count the seconds!
100105

106+
- Focus on the ``user`` line, because ``real`` includes the time for establishing connection and giving the credentials!
107+
- Do you spott any difference?
101108

102109
???- tip "Answer (Tetralith example)"
103110

104-
Archiving and compressions step on REMOTE
111+
Archiving and step on REMOTE
105112

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!
107115

108116
LOCALLY
109117

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 .``
111120

112121
- [Video for Tetralith](https://youtu.be/UPnbnfTYHAQ)
113122

114123

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)"
116125

117126
Tips
118127

119128
In an SSH session (not SFTP) with REMOTE/server
120129

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``
123132
- ``$ cd many_files_sftp``
124-
- ``$ touch file_{1..1000}.txt``
133+
- ``$ touch file_{1..3000}.txt``
125134
- Check content: ``$ ls`` for checking
126135
- 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!
128138

129-
Establish the SFTP session (Exercise 1)
139+
Establish the SFTP session (Exercise 1 in SFT session)
130140

131141
- Download (to local) the *directory* and note the time needed
132142
(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
134144
- Was there a significant difference?
135145

136146
???- tip "Answer (Example with Tetralith)"
137147

138148
Archiving and compressions step REMOTELY
139149

140-
- ``tar -cvzf many_files_sftp.tar.gz many_files``
150+
- ``tar -cvf many_files_sftp.tar many_files``
141151

142152
Establish SFTP connection
143153

0 commit comments

Comments
 (0)