fs: remove quiz. No time for that :sad: 😥
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@211 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
parent
628d204803
commit
a3897c32ea
7 changed files with 0 additions and 419 deletions
site/pages/fs
|
@ -1,50 +0,0 @@
|
|||
---
|
||||
layout: page
|
||||
category: Filesystem
|
||||
tags: Hard links
|
||||
author: Ricardo Vivanco
|
||||
title: fs
|
||||
previous-page: pages/fs/Hard
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
|
||||
|
||||
|
||||
<h1>Hard and Symbolic links</h1>
|
||||
|
||||
<p>In Unix-like operating systems such as Linux, “everything is a file” and a file
|
||||
is fundamentally a link to an inode (a data structure that stores everything about a
|
||||
file apart from its name and actual content).
|
||||
A hard link is a file that points to the same underlying inode, as another file.
|
||||
In case you delete one file, it removes one link to the underlying inode. Whereas a
|
||||
symbolic link (also known as soft link) is a link to another filename in the filesystem.
|
||||
Another important difference between the two types of links is that hard links can only
|
||||
work within the same filesystem while symbolic links can go across different filesystems.
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
---
|
||||
layout: page
|
||||
category: Filesystem
|
||||
tags: Hard links
|
||||
author: Ricardo Vivanco
|
||||
title: fs
|
||||
previous-page: pages/fs/Hard:symbolic_links.html
|
||||
---
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
|
||||
<h1>How to Create Hard Links in Linux</h1>
|
||||
|
||||
<p>To create a hard links in Linux, we will use ln utility. For example, if you want
|
||||
to create a hard link named "hard_link1" to the file "file1" you can use first
|
||||
the <code> ls <code> <code> -l <code> command in order to see all files. Then you
|
||||
write <code> ln <code> "file1" "hard_link1" and after that if you write down again
|
||||
<code> ls <code> <code> -l <code> you can finally see the hard link named "hard_link1"
|
||||
created. Looking at that output, using <code> ls <code> command, the new file is not indicated
|
||||
as a link, it is shown as a regular file. This implies that "hard_link1" is just another
|
||||
regular executable file that points to the same underlying inode as "file1".
|
||||
If you desire to make a hard link directly into a soft link, use the <code> -P <code> flag
|
||||
like this: <code> ln <code> <code> -P <code> "file1" "hard_link1"
|
||||
|
||||
</p>
|
||||
|
||||
</header>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,121 +0,0 @@
|
|||
---
|
||||
layout: page
|
||||
category: File System
|
||||
tags: absolute relative path
|
||||
author: Marwan Announ
|
||||
title: fs
|
||||
---
|
||||
<p>
|
||||
<h1>ABSOLUTE VS RELATIVE</h1>
|
||||
|
||||
<p>
|
||||
Now, you can ask, why I have to use one or another?
|
||||
<br> What is the difference? and questions like this.
|
||||
<br> <br> <br> Don't worry, the answer it's easy.., we can use an absolute path from any location
|
||||
<br> whereas you want to use relative path we should be present that you have to be in the working directory.
|
||||
</p>
|
||||
|
||||
|
||||
<br><br><br>We suppose that now you know the differences between both, but, what is the vantages and disadvantages?
|
||||
|
||||
|
||||
<br> <br> <br>
|
||||
<h3> Pro and Cons of using Absolute and Relative </h3>
|
||||
|
||||
<pre>
|
||||
<br>1)Absolute paths are clearer: who will have to maintain/modify your script (you or others) will be able to know
|
||||
<br>every time what directories are involved;
|
||||
<br><br>2)With absolute paths you are sure the involved directories are the one with the exact path you are writing
|
||||
<br>in the script;
|
||||
<br><br>3)Relative paths are shorter, but you need to be sure of the subtree you're working into;
|
||||
<br><br>4)You can achieve shortness replacing recurring paths with a variable at the beginning of the script
|
||||
<br><br>
|
||||
(e.g. /var/log/app/component/module/logfile.log -> $module_log_dir/logfile.log)
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
<!-- quiz about absolute vs relative, where the user have to choose one or another(javascript) -->
|
||||
|
||||
<h3> I'm sure that if you read this for two or more times you will be able to pass the quiz </h3>
|
||||
|
||||
Yeah, right, there is a quiz.
|
||||
<br> The best way to learn something it's not the theory, in fact you have to do some practice, if you click
|
||||
<br> the button "QUIZ", you can try to do a quiz in order to check what you've just read.
|
||||
|
||||
<br><br><br> Don't worry it's for you, good luck
|
||||
|
||||
|
||||
<br><br><br> * for css, please try to do a button or layout to links the quiz*
|
||||
|
||||
</p>
|
||||
<!-- quiz di javascript pronto che linkero -->
|
||||
|
||||
<!--
|
||||
|
||||
<link href ="style.css" rel ="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||
<script src = "main.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1>Are you ready for the quiz?</h1>
|
||||
|
||||
|
||||
<form id = "quiz" name = "quiz">
|
||||
|
||||
|
||||
|
||||
<p class = "questions">What is path?</p>
|
||||
|
||||
<input type = "radio" id = "mc" name = "question1" value = "Is a location to a folder or file in a file system of a Operating System"> Is a location to a folder or file in a file system of a Operating System<br>
|
||||
<input type = "radio" id = "mc" name = "question1" value = "Is an Operating System"> Is an Operating System<br>
|
||||
<input type = "radio" id = "mc" name = "question1" value = "Is a folder that you can find on your Operating System"> Is a folder that you can find on your Operating System<br>
|
||||
|
||||
|
||||
|
||||
<p class = "questions">What is an absolute path?</p>
|
||||
|
||||
<input type = "radio" id = "mc" name = "question2" value = "The bigger folder that you can find on your Operating System"> The bigger folder that you can find on your Operating System<br>
|
||||
<input type = "radio" id = "mc" name = "question2" value = "Is defined as specifying the location of a file or directory from the root directory(/)"> Is defined as specifying the location of a file or directory from the root directory(/)<br>
|
||||
<input type = "radio" id = "mc" name = "question2" value = "The last location of a file or directory from Documents"> The last location of a file or directory from Documents<br>
|
||||
|
||||
|
||||
|
||||
<p class = "questions">"cat /home/a1/group1.txt" it's an example of absolute path?</p>
|
||||
|
||||
<input type = "radio" id = "mc" name = "question3" value = "YES"> YES <br>
|
||||
<input type = "radio" id = "mc" name = "question3" value = "NO"> NO <br>
|
||||
|
||||
|
||||
<p class = "questions">If you choose "NO" why it's not correct? if you think it's correct don't write anything</p>
|
||||
<input id = "textbox" type = "text" name = "question4">
|
||||
|
||||
|
||||
|
||||
<p class = "questions">"pwd/home/user1cd Documents" it's an example of relative path?</p>
|
||||
|
||||
<input type = "radio" id = "mc" name = "question5" value = "YES"> YES <br>
|
||||
<input type = "radio" id = "mc" name = "question5" value = "NO"> NO <br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br><br><input id = "button" type = "button" value = "Finish? Sure!?" onclick = "check();">
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div id = "after_submit">
|
||||
<p id = "number_correct"></p>
|
||||
<p id = "message"></p>
|
||||
<img id = "picture">
|
||||
</div>
|
||||
|
||||
-->
|
|
@ -1,74 +0,0 @@
|
|||
body {
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#quiz {
|
||||
margin-left: 10px;
|
||||
background: #d2def2;
|
||||
padding: 10px 20px 10px 20px;
|
||||
width: 400px;
|
||||
border-radius: 20px;
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
margin-bottom: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#textbox {
|
||||
height: 25px;
|
||||
font-size: 16px;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
#button {
|
||||
background: green;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
transition-duration: .5s;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#button:hover {
|
||||
background: white;
|
||||
border: 1px solid green;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
#after_submit {
|
||||
visibility: hidden;
|
||||
background: #ff5459;
|
||||
padding: 10px 20px 10px 20px;
|
||||
width: 400px;
|
||||
border-radius: 20px;
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
font-size: 30px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#picture {
|
||||
width: 375px;
|
||||
height: 245px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#mc {
|
||||
display: inline;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title> SA group-1 </title>
|
||||
<link href ="style.css" rel ="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||
<script src = "main.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1>Are you ready for the quiz?</h1>
|
||||
|
||||
|
||||
<form id = "quiz" name = "quiz">
|
||||
|
||||
|
||||
<p class = "questions">Which of the two groups are better?</p>
|
||||
<input id = "textbox" type = "text" name = "question1">
|
||||
|
||||
<p class = "questions">What is unix?</p>
|
||||
<input type = "radio" id = "mc" name = "question2" value = "A dog"> A dog<br>
|
||||
<input type = "radio" id = "mc" name = "question2" value = "A type of.."> A type of..<br>
|
||||
|
||||
<p class = "questions">What is absolute path?</p>
|
||||
|
||||
<input type = "radio" id = "mc" name = "question3" value = "A type of.."> A type of..<br>
|
||||
<input type = "radio" id = "mc" name = "question3" value = "A Dog"> A dog<br>
|
||||
|
||||
|
||||
<br><br><input id = "button" type = "button" value = "Finish? Sure!?" onclick = "check();">
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div id = "after_submit">
|
||||
<p id = "number_correct"></p>
|
||||
<p id = "message"></p>
|
||||
<img id = "picture">
|
||||
</div>
|
||||
</html>
|
||||
|
||||
</body>
|
|
@ -1,40 +0,0 @@
|
|||
function check(){
|
||||
|
||||
var question1 = document.quiz.question1.value;
|
||||
var question2 = document.quiz.question2.value;
|
||||
var question3 = document.quiz.question3.value;
|
||||
var correct = 0;
|
||||
|
||||
|
||||
if (question1 == "group1") {
|
||||
correct++;
|
||||
}
|
||||
if (question2 == "A type of..") {
|
||||
correct++;
|
||||
}
|
||||
if (question3 == "A type of..") {
|
||||
correct++;
|
||||
}
|
||||
|
||||
var pictures = ["img/win.gif", "img/meh.jpeg", "img/lose.gif"];
|
||||
var messages = ["Great job!", "That's just okay", "You really need to do better"];
|
||||
var score;
|
||||
|
||||
if (correct == 0) {
|
||||
score = 2;
|
||||
}
|
||||
|
||||
if (correct > 0 && correct < 3) {
|
||||
score = 1;
|
||||
}
|
||||
|
||||
if (correct == 3) {
|
||||
score = 0;
|
||||
}
|
||||
|
||||
document.getElementById("after_submit").style.visibility = "visible";
|
||||
|
||||
document.getElementById("message").innerHTML = messages[score];
|
||||
document.getElementById("number_correct").innerHTML = "You got " + correct + " correct.";
|
||||
document.getElementById("picture").src = pictures[score];
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
function check(){
|
||||
|
||||
var question1 = document.quiz.question1.value;
|
||||
var question2 = document.quiz.question2.value;
|
||||
var question3 = document.quiz.question3.value;
|
||||
var question4 = document.quiz.question4.value;
|
||||
var question5 = document.quiz.question5.value;
|
||||
|
||||
|
||||
var correct = 0;
|
||||
|
||||
|
||||
if (question1 == "Is a location to a folder or file in a file system of a Operating System") {
|
||||
correct++;
|
||||
}
|
||||
if (question2 == "Is defined as specifying the location of a file or directory from the root directory(/)") {
|
||||
correct++;
|
||||
}
|
||||
if (question3 == "YES") {
|
||||
correct++;
|
||||
}
|
||||
if (question4 == "") {
|
||||
correct++;
|
||||
}
|
||||
if (question5 == "YES") {
|
||||
correct++;
|
||||
}
|
||||
|
||||
|
||||
var pictures = ["img/win.gif", "img/meh.jpeg", "img/lose.gif"];
|
||||
var messages = ["Great job!", "That's just okay", "You really need to do better"];
|
||||
var score;
|
||||
|
||||
if (correct == 0) {
|
||||
score = 4;
|
||||
}
|
||||
|
||||
if (correct > 0 && correct < 5) {
|
||||
score = 3;
|
||||
}
|
||||
|
||||
if (correct == 5) {
|
||||
score = 0;
|
||||
}
|
||||
|
||||
document.getElementById("after_submit").style.visibility = "visible";
|
||||
|
||||
document.getElementById("message").innerHTML = messages[score];
|
||||
document.getElementById("number_correct").innerHTML = "You got " + correct + " correct.";
|
||||
document.getElementById("picture").src = pictures[score];
|
||||
}
|
Loading…
Reference in a new issue