interm: added pages on Install, mount, Who commands

git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@133 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
faracm 2018-11-12 11:32:24 +00:00
parent 5dba95ac12
commit cc6c82e3cd
3 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,53 @@
---
layout: page
category_title: Intermediate commands
category-page: intermediate
author: Marco Farace
title: install
---
<h2>Use: install binaries, move or copy files</h2>
<p>The file(s) are copied to the target file or directory. If the destination
is a directory, then the file is copied into directory with its original
filename. If the target file already exists, it is either renamed to
file.old if the -b option is given or overwritten if permissions allow.
An alternate backup suffix may be specified via the -B option's argument.
Basic syntax is in the form <code>install [OPTION]... SOURCE DEST</code>
<br><code>$install -D /source/folder/*.xyz /destination/folder</code><br>
this line of code copies all .xyz file from /source/folder to
/destination/folder</p>
<p>
Here are just some of the most useful options for this command:
<ul>
<li>-b<br></li>
Back up any existing files before overwriting them by renaming
them to file.old. See -B for specifying a different backup suffix.
(-B suffix Use suffix as the backup suffix if -b is given)
<li>-C<br></li>
Copy the file. If the target file already exists and the files
are the same, then don't change the modification time of the target
<li>-d<br></li>
Create directories. Missing parent directories are created as
required.
<li>-f<br></li>
Specify the target's file flags; see chflags(1) for a list of
possible flags and their meanings.
<li>-g<br></li>
Specify a group. A numeric GID is allowed.
<li>-m<br></li>
Specify an alternate mode. The default mode is set to rwxr-xr-x
(0755). The specified mode may be either an octal or symbolic
value;
<li>-o<br></li>
Specify an owner. A numeric UID is allowed.
</p>

View File

@ -0,0 +1,48 @@
---
layout: page
category_title: Intermediate commands
category-page: intermediate
author: Marco Farace
title: Who/WhoamI
---
<h2>Use: display a list of all logged in users/display info about current user</h2>
<p>The who utility displays a list of all users currently logged on, showing
for each user the login name, tty name, the date and time of login, and
hostname if not local. </p>
<p>
Here are just some of the most useful options for this command:
<ul>
<li>-b</li><br> Display time of last system boot.
<li> -d</li><br> Print dead processes.
<li>-H</li><br> Write column headings above the regular output.
<li>-m</li><br> Only print information about the current terminal. This is the
POSIX way of saying who am i.
<li>-q</li><br> ``Quick mode'': List only the names and the number of users cur-
rently logged on. When this option is used, all other options are
ignored.
<li>-s</li><br> List only the name, line and time fields. This is the default.
<li>-T</li><br> Print a character after the user name indicating the state of the
terminal line: `+' if the terminal is writable; `-' if it is not;
and `?' if a bad line is encountered.
<li>-u</li><br> Print the idle time for each user, and the associated process ID.
<li>am I</li><br> Returns the invoker's real user name.
<li>file</li><br> By default, who gathers information from the file /var/run/utmpx.
An alternative file may be specified.
<ul>
</p>

View File

@ -0,0 +1,83 @@
---
layout: page
category_title: Intermediate commands
category-page: intermediate
author: Marco Farace
title: mount
---
<h2>Use: mount file systems </h2>
<p>To access a file on a Unix-like machine, the file system that contains it
needs to be mounted with the mount command. Mount is frequently used for
movable storage devices such as SD cards, DVDs, etc...
The mount command instructs the operating system that a file system is ready to
use, and associates it with a particular point in the overall file system
hierarchy (its mount point) and sets options relating to its access. Mounting
makes file systems, files, directories, devices and special files available for
use and available to the user.
Its counterpart, umount, does exactly the opposite.
Both mount and umount require root user persmissions.
To display all mounted partitions just write <code> mount </code></p>
<p> This command will mount the second partition of a HDD:<br>
<code> $ mount /dev/hda2 /media/PHOTOS </code>
</p>
<p> and will unmount (by referring to the physical disk partition):<br>
<code> $ umount /dev/hda2 </code>
</p>
<p> or (by referring to the mount point):<br>
<code> $ umount /media/PHOTOS </code>
</p>
<p> Here are just some of the most useful options for this command:
<ul>
<li>-d<br></li>
Causes everything to be done except for the actual system call.
This option is useful in conjunction with the -v flag to determine
what the mount command is trying to do.
<li>-v<br></li>
Verbose mode. (Gives additional detail during the mount process)
<li>-f<br></li>
Forces the revocation of write access when trying to downgrade a
filesystem mount status from read-write to read-only.
<li>-u<br></li>
The -u flag indicates that the status of an already mounted file
system should be changed. Any of the options discussed above
(the -o option) may be changed; also a file system can be changed
from read-only to read-write or vice versa. An attempt to change
from read-write to read-only will fail if any files on the
filesystem are currently open for writing unless the -f flag is
also specified.
<li>-w<br></li>
Mount the file system read-write.
<li>-o<br></li>
Options are specified with a -o flag followed by a comma separated
string of options. The following options are available:
<ul>
<li>noexec<br></li>
Do not allow execution of any binaries on the mounted file system.
This option is useful for a server that has file systems containing
binaries for architectures other than its own.
<li>noowners<br></li>
Ignore the ownership field for the entire volume. This causes all
objects to appear as owned by user ID 99 and group ID 99. User ID 99
is interpreted as the current effective user ID, while group ID 99 is
used directly and translates to ``unknown''.
<li>nobrowse<br></li>
This option indicates that the mount point should not be visible via
the GUI (It will not appear on the Desktop as a separate volume).
</ul>
</ul>
</p>