Skip to content

Commit e0f1a0f

Browse files
committed
notes
1 parent a9da8a3 commit e0f1a0f

File tree

2 files changed

+106
-7
lines changed

2 files changed

+106
-7
lines changed

_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ parts:
2828
- file: notes/2023-03-02
2929
- file: notes/2023-03-07
3030
- file: notes/2023-03-09
31+
- file: notes/2023-03-21
3132
- caption: Activities
3233
chapters:
3334
- file: activities/kwl

notes/2023-03-21.md

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
# How can I work on a remote server?
33

4-
Today we will connect to a remote server, use an HPC system with scheduler, and learn new bash commands for working with the *content* of files.
4+
Today we will connect to a remote server and learn new bash commands for working with the *content* of files.
55

66

77

88
## What are remote servers and HPC systems?
99

10-
![diagram illustrating a remot connection to a login node and compute cluster](../img/hpcsketch.svg)
10+
![diagram illustrating a remote connection to a login node and compute cluster](../img/hpcsketch.svg)
1111

1212

1313

@@ -24,7 +24,7 @@ If you are doing research supervised by a URI professor, there are other servers
2424
```
2525
````
2626

27-
Our login is the part of your uri e-mail address before the @ and I will tell you how to find your default password if you missed class.
27+
Our login is the part of your uri e-mail address before the @ and I will tell you how to find your default password if you missed class (do not want to post it publicly). Comment on your experience report PR to ask for this information.
2828
```
2929
ssh -l brownsarahm seawulf.uri.edu
3030
```
@@ -48,6 +48,12 @@ Retype new password:
4848
passwd: all authentication tokens updated successfully.
4949
Connection to seawulf.uri.edu closed.
5050
```
51+
52+
```{important}
53+
You use the default password when prompted for your username's password. Then again when it asks for the `(current) UNIX password:`. Then you must type the same, new password twice.
54+
55+
**Choose a new password you will remember, we will come back to this server**
56+
```
5157
after you give it a new password, then it logs you out and you have to log back in.
5258

5359
```
@@ -80,8 +86,12 @@ Notice that the prompt says `uriusername@seawulf` to indicate that you are logge
8086

8187
## Downloading files
8288

89+
`wget` allows you to get files from the web.
90+
8391
```
8492
[brownsarahm@seawulf ~]$ wget http://www.hpc-carpentry.org/hpc-shell/files/bash-lesson.tar.gz
93+
```
94+
```
8595
--2022-03-08 12:58:09-- http://www.hpc-carpentry.org/hpc-shell/files/bash-lesson.tar.gz
8696
Resolving www.hpc-carpentry.org (www.hpc-carpentry.org)... 104.21.33.152, 172.67.146.136
8797
Connecting to www.hpc-carpentry.org (www.hpc-carpentry.org)|104.21.33.152|:80... connected.
@@ -433,12 +443,14 @@ drwxr-xr-x. 2 brownsarahm spring2022-csc392 10 Mar 8 13:16 results
433443
script works
434444
```
435445

446+
We can add a bit more to our script to make it more interesting
436447
```
437448
[brownsarahm@seawulf ~]$ nano demo.sh
438449
```
439450

440-
We can add a bit more to our script to make it more interesting
441-
```
451+
452+
453+
```bash
442454
for VAR in *.gz
443455
do
444456
echo $VAR
@@ -448,7 +460,7 @@ done
448460
echo 'script works'
449461
```
450462

451-
and note that tht does not change the permission.
463+
and note that that does not change the permission.
452464
```
453465
[brownsarahm@seawulf ~]$ ls -l
454466
total 138452
@@ -500,4 +512,90 @@ drwxr-xr-x. 2 brownsarahm spring2022-csc392 10 Mar 8 13:16 results
500512

501513
## Experience Report Evidence
502514

503-
## Questions After Today's Class
515+
## Questions After Today's Class
516+
517+
### What is meant by the term "gene symbol" ?
518+
519+
For the purpose of this class it is just a bit of the content in the file. For completeness, since the file is genomic data is is a name for the gene at that line.
520+
521+
### How would we change permissions for just one type of user with chmod instead of all users?
522+
523+
There are two ways. One is to se the permision you want it to end up at, for exame `chmod 744 demo.sh`.
524+
525+
- "g" is for group
526+
- "o" is for others
527+
- "-" is for removing permissions
528+
- "r" is for read-permission
529+
- "w" is for write-permission
530+
- "x" is for execute permission.
531+
- "u" is for user / owner
532+
- "+" is for adding permissions
533+
534+
### When would I use these remote servers most often?
535+
536+
Remote servers are used for production code, and for large computations in any sort of science setting or machine learning setting.
537+
538+
### Is it normal to be able to change file permissions? In the case in class i think it worked because it was our own file, but we wouldnt be able to just change other peoples permissions right?
539+
540+
Correct you have to have write permission to be able to do this.
541+
542+
### What type of data structure for storage does the server we used today follow? How does it version track and store files?
543+
544+
It is a regular unix system with a standard file system. If we want to track versions, we use git. (or another version control system)
545+
546+
### Will the files on our seawulf, still be available after exiting.
547+
548+
Yes, but not forever. Seawulf is a teaching server that makes no promise of backing up or keeping your data forever.
549+
550+
### What are .fastq and .gz files?
551+
552+
.gz is a zip file, .fastq is a plain text output of a sequencing tool.
553+
554+
### Can we connect to other servers other than the URI server?
555+
556+
Yes, if you have credentials, the ssh works basically the same way. We will learn one more thing that will give you more ability to use other servers next week.
557+
558+
559+
### What is the point of a remote server?
560+
561+
More compute power.
562+
563+
### Do the fiels download directly to my computer or to the remote server?
564+
565+
The file goes to the system where the command is run, in this case, it went to the the server.
566+
567+
### where is the ssh server downloaded on my computer?
568+
569+
ssh is the *connection protocol* or the set of rules by which our information is sent.
570+
571+
The server is another computer, you were using that computer *through* your local terminal.
572+
573+
We did not create any files on your local system today.
574+
575+
### Is access to the chmod command restricted on computers and servers?
576+
577+
on a file by file basis typically, eys.
578+
579+
### Can I access the remote files using vscode and write code?
580+
581+
Theoretically yes, but a more typical workflow would be to edit large files locally running vscode on your system then send the code to the remote server to run it. You might send one file at a time directly there or push from your local system to for example GitHub and then from GitHub on the server.
582+
583+
### Will I work with files more like this or locally as a software engineer?
584+
585+
Maybe not this type specifically, but you will almost surely encounter a large file at some point. You will also likely encounter a server for some reason.
586+
587+
### for files that are impossible to open with text editors because they're too long, is it possible to edit parts of the file just through terminal commands?
588+
589+
Yes! This is a good explore badge as well.
590+
591+
### How can I zip from tthe terminal?
592+
593+
`zip file file` [see the man](https://ss64.com/bash/zip.html)
594+
595+
### Are you able to run a website through a terminal?
596+
597+
You could launch a web server from a terminal. You can also launch a browser.
598+
599+
For he course website when I build the pdf, version a bash script launches a browser, uses the browsers print to pdf function and closes the browser.
600+
601+

0 commit comments

Comments
 (0)