interm-team: added three commands

git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@84 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
feninf 2018-11-10 13:13:07 +00:00
parent 2e3af8b66b
commit f59bcc25df
3 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,35 @@
---
layout: page
category: Intermediate commands
tags: basename
author: Fabiano Fenini
title: BASENAME
next-page: ""
---
<p>The <code>basename</code> command deletes any prefix ending with the last slash "/" character present in string and also a suffix.
</p>
<h2>Usage<h2>
<p>The default basename command syntax is:
<pre>
basename [flags] [string] [suffix]
</pre>
Where [flags] are the cat flags, read below for more info, the string command is the pathname and the suffix, if indicated, will be also deleted.
</p>
<h2>Flags<h2>
<p>Here are some of the most common basename flags:
<ul>
<li> <b>-a</b>: Every aregument is treated as a string </li>
<li> <b>-s</b>: The suffix is taken as its argument </li>
<li> <b>-a</b>: Supports multiple arguments and they will be treated as a name </li>
</ul>
</p>

View File

@ -0,0 +1,37 @@
---
layout: page
category: Intermediate commands
tags: cat
author: Fabiano Fenini
title: CAT
next-page: ""
---
<p>The <code>cat</code> command can be easily associated to the word “concatenation” but it doesnt have that only function: in fact, cat command gives us the possibility to create files and also to display them.
</p>
The name stands for <i>catenate</i>.
<h2>Usage<h2>
<p>The default cat command syntax is:
<pre>
cat [flags] [--] [file1] [file2 ...] ]
</pre>
Where [flags] are the cat flags, read below for more info, [--] indacates that the following parameters won't be considered as flags, while the file parameters indicates the names of one or more files to concatenate.
Between the names of two files is possible to use the shell redirection symbol ">", in order to redirect the output to the file considered.
</p>
<h2>Flags<h2>
<p>Here are some of the most common cat flags:
<ul>
<li> <b>-n</b>: Display the line numbers of a file </li>
<li> <b>-e</b>: Display "$" at the end of the line and also where there is a gap between paragraphs </li>
<li> <b>-T</b>: Display TAB characters </li>
</ul>
</p>

View File

@ -0,0 +1,36 @@
---
layout: page
category: Intermediate commands
tags: password
author: Fabiano Fenini
title: PASSWD
previous-page: ""
---
<p>The <code>passwd</code> command allows us to change or to assign a password of authentication of an user currently in the system. When the user doesnt have particular privileges, he is only able to change is password, while the root user has the possibility to change also other users passwords.<br>
The name stands for <i>password</i>.
<h2>Usage<h2>
<p>The default passwd command syntax is:
<pre>
passwd [flags] [user]
</pre>
Where [flags] are the passwd flags, read below for more info, the parameter [user] can only be specified by the root user. If no user is provided, passwd proceed to set the password of the user who uses this command. You will first be asked to enter the user password.
</p>
<h2>Flags<h2>
<p>Here are some of the most common passwd flags:
<ul>
<li> <b>-d</b>: Delete the user password </li>
<li> <b>-h</b>: Get information about how to use this command </li>
<li> <b>-l</b>: Lock the password </li>
<li> <b>-u</b>: Unlock the password </li>
<li> <b>-S</b>: See the account status information </li>
</ul>
</p>