css-team:added favicon

git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@213 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
britea 2018-11-15 16:19:19 +00:00
parent a2e9bf0e82
commit 4bfd5ecc48
6 changed files with 168 additions and 60 deletions

View File

@ -6,6 +6,8 @@
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="icon" href="{{ site.baseurl }}/assets/style/favicon.ico">
<!-- fonts -->
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">

View File

@ -33,8 +33,37 @@
var bdy = document.getElementById("bdy");
document.addEventListener("keypress", function(event){
if(event.key == "q"){
if(event.key == "w" || event.key == "k"){
window.scrollTo (0,0);
}else if(event.key == "~"){
location.href = "{{ site.baseurl }}/";
}else if(event.key == "a" || event.key == "h"){
var previous = "{{ site.baseurl }}/{{ page.previous-page }}";
if(previous){
location.href = previous;
}
}else if(event.key == "d" || event.key == "l"){
var next = "{{ site.baseurl }}/{{ page.next-page }}";
if(next){
location.href = next;
}
}else if(event.key == "s" || event.key == "j"){
var topic;
switch("{{ page.category-page }}"){
case "basic":
topic = "{{ site.baseurl }}/pages/topic/cmd/basic.html";
case "intermediate":
topic = "{{ site.baseurl }}/pages/topic/cmd/intermediate.html";
case "advanced":
topic = "{{ site.baseurl }}/pages/topic/cmd/advanced.html";
case "fs":
topic = "{{ site.baseurl }}/pages/topic/fs.html";
case "scripts":
topic = "{{ site.baseurl }}/pages/topic/scripts.html";
};
if (topic){
location.href = topic;
}
}
});
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -6,60 +6,134 @@ tags:
author: Andrea Brites Marto
title: 7z
---
<p>
A .7z. file is an archive format that stands for 7-zip. By default, Mac OS X does not know how to handle these files, but that is not a big deal because you can download for free in App Store. The program supports 7z, ZIP, CAB, ARJ, BZIP2, TAR, CPIO, RPM and DEB.<br>
So, first of all, you need to download Unarchiver in order to use this command.<br>
The basic syntax is:
</p>
<pre>
7z [adeltux] [-] [SWITCH] <code>&lt;ARCHIVE_NAME&gt; &lt;ARGUMENTS&gt;</code>
</pre>
<pre>
7z [adeltux] [-] [SWITCH] <code>&lt;ARCHIVE_NAME&gt; &lt;ARGUMENTS&gt;</code>
</pre>
Here some useful options that we will use to explain some examples:
Here some useful options that we will use to explain some examples:
<ul>
<li><code>a</code> Add</li>
<li><code>d</code> Delete</li>
<li><code>e</code> Extract</li>
<li><code>l</code> List</li>
<li><code>t</code> Test</li>
<li><code>u</code> Update</li>
<li><code>x</code> Extract with full paths</li>
</ul>
<ul>
<li><i>a</i> Add</li>
<li><i>d</i> Delete</li>
<li><i>e</i> Extract</li>
<li><i>l</i> List</li>
<li><i>t</i> Test</li>
<li><i>u</i> Update</li>
<li><i>x</i> Extract with full paths</li>
</ul>
The simplest way to use <code>7z</code> if we want to extracts all files from archive archive.zip to the current directory.
The simplest way to use <code>7z</code> if we want to extracts all files from archive archive.zip to the current directory.
<pre>
7z e archive.zip
</pre>
<pre>
7z e archive.zip
</pre>
Well, now we talk about the switches.
There are many type of switches, we will see the most common ones.<br>
Well, now we talk about the switches.
There are many type of switches, we will see the most common ones.
-m (Set compression Method)
<h1>-m (Set compression Method)</h1>
<pre>
-m&lt;method_parameters&gt;
</pre>
<p>Specifies the compression method</p>
<pre>
-m&lt;method_parameters&gt;
</pre>
The format for this switch depends on the archive type which are:
<ul>
<li>Zip</li>
<li>GZip</li>
<li>BZip2</li>
<li>7z</li>
<li>XZ</li>
<li>WIM</li>
</ul>
The format for this switch depends on the archive type which are:
<ul>
<li>Zip</li>
<li>GZip</li>
<li>BZip2</li>
<li>7z</li>
<li>XZ</li>
<li>WIM</li>
</ul>
<h1>-r (Recurse subdirectories) switch</h1>
<p>Specifies the method of treating filenames or wildcards on the command line.</p>
The syntax:
<pre>
-r[- | 0]
</pre>
<table>
<tr>
<td> Switch </td>
<td> Description </td>
</tr>
<tr>
<td> -r </td>
<td> Enable recurse subdirectories </td>
</tr>
<tr>
<td> -r- </td>
<td> Disable recurse subdirectories. This is the default option. </td>
</tr>
<tr>
<td> -r0 </td>
<td> Enable recurse subdirectories only for wildcard names </td>
</tr>
</table>
<p>
If we want to list all *.doc files that belong to the archived root directory in the <i>archive.zip</i> archive, we can do as follows:
</p>
<pre>
7z l archive.zip *.doc -r-
</pre>
<h1>-p (Set password) switch</h1>
<p>Specifies a password</p>
Here the syntax is very simple:
<pre>
-p{password}
</pre>
If we want to protect some files we can compress for example all *.txt files to archive.7z using a password as "cimbale".
<pre>
7z a archive.7z -pcimbale
</pre>
Then if we want to extracts all files from archive.7z we need the password "cimbale".
<pre>
7z x archive.7z -pcimbale
</pre>
<h1> -x (Exclude filenames) switch </h1>
<p>
Specifes which filenames or wildcards must be excluded from the operation.
</p>
Syntax:
<pre>
-x[&lt;recurse_type&gt;]&lt;file_ref&gt;
</pre>
Sometimes we need to add files into an archive.7z, except one, this can be done as fllows:
<pre>
7z a -tzip archive.7z *.txt -x!temp.*
</pre>
<p>We described the most important swtiches and uses of this command, but there are more.</p>
</p>

View File

@ -9,18 +9,19 @@ title: git
<p>
If you want to use <i>Git</i> on the shell you need to know how this command works (usually it is preinstalled on Mac and Linux).<br>
The <code>git</code> command providesa set of high-level operations and full access to internals.
The <i>git</i> command providesa set of high-level operations and full access to internals.
Here is the basic syntax but sometimes you will may have some more complicated:
</p>
<pre>
git [flags] [path]
git [flags] [path]
</pre>
First of all, you need to know if you have the right version of git with:
<pre>
git --version
git --version
</pre>
Now that we know that we have the right version, we can move to the common <code>git</code> flags used.
@ -28,29 +29,31 @@ I will divide commands in different type of operation.<br>
<h3>Start a working area</h3>
<ul>
<li>-clone: is used to clone a repository in a new directory.</li>
<li>-init: this onw is used to create an empty Git repository or reinitialize an existing one.</li>
<li>clone: is used to clone a repository in a new directory.</li>
<li>init: this onw is used to create an empty Git repository or reinitialize an existing one.</li>
</ul>
<h3>Work on the current changes</h3>
<ul>
<li>-add: add a file contents to the index.</li>
<li>-mv: move or renamea file, directory or a symlink (a symbolic link).</li>
<li>-rm: remove files from the working tree and from the index.</li>
<li>add: add a file contents to the index.</li>
<li>mv: move or renamea file, directory or a symlink (a symbolic link).</li>
<li>rm: remove files from the working tree and from the index.</li>
<li>format-patch id(commit): create a file patch</li>
<li>am: apply a patch file</li>
</ul>
<h3>History and state</h3>
<ul>
<li>-log: show commit logs.</li>
<li>-status: show the working tree status.</li>
<li>log: show commit logs.</li>
<li>status: show the working tree status.</li>
</ul>
<h3>Managing modification</h3>
<ul>
<li>-commit: record changes to the repository.</li>
<li>-diff: show changes between commits.</li>
<li>-merge: merge two or more development histories together.</li>
<li>-pull: fetch from and update your local directory with the repository.</li>
<li>-push: update the remote repository with your changes.</li>
<li>commit: record changes to the repository.</li>
<li>diff: show changes between commits.</li>
<li>merge: merge two or more development histories together.</li>
<li>pull: fetch from and update your local directory with the repository.</li>
<li>push: update the remote repository with your changes.</li>
</ul>
</p>

View File

@ -8,16 +8,16 @@ title: ps
---
<p>
The <code>ps</code> command stands for "process status" and it is used to provide
The <i>ps</i> command stands for "process status" and it is used to provide
various information about the currently running processes.<br>
Every process is an executing instance of a program which is assigned a unique PID
(process identification numbers) by the system.</p>
The basic syntax of <code>ps</code> is:
The basic syntax of <i>ps</i> is:
<pre>
ps [options]
ps [options]
</pre>
<p>
@ -35,7 +35,7 @@ Here you will find some common option combinations
</p>
<pre>
ps -aux | less
ps aux | less
</pre>
<ul>
@ -47,14 +47,14 @@ ps -aux | less
</ul>
<p>
This can be piped to the less command ( see out section pipe), which let us to
This can be piped to the less command (see our section pipe), which let us to
view all processes in one screenfull at a time.<br>
Another way to view all processes running on the system is:
</p>
<pre>
ps -ef | less
ps ef | less
</pre>
Where:
@ -72,7 +72,7 @@ the account that owns the process) and STIME to know when the process started, o
the starting date.<br>
In the end the <code>ps</code> is very powerful if we know how to use it.
In the end the <i>ps</i> is very powerful if we know how to use it.
If you need to kill a process you can list all process in various ways
and search for the process you need to kill by reading its PID or by UID for example.
</p>