02-Unix Basics
02-Unix Basics
To log in:
Have your userid (user identification) and password ready. Contact your system administrator if you don't have
these yet.
Type your userid at the login prompt, then press ENTER. Your userid is case-sensitive, so be sure you type it
exactly as your system administrator instructed.
Type your password at the password prompt, then press ENTER. Your password is also case-sensitive.
If you provided correct userid and password then you would be allowed to enter into the system. Read the
information and messages that come up on the screen something as below.
You would be provided with a command prompt (sometime called $ prompt ) where you would type your all the
commands. For example, to check calendar you need to type cal command as follows:
Here enteries starting with d..... represent directories. For example uml, univ and urlspedia are directori es and rest of the enteries are files.
The command ls supports the -1 option which would help you to get more information about the listed files:
In the ls -l listing example, every file line began with a d, -, or l. These characters indicate the type of file that's
listed.
Meta characters have special meaning in Unix. For example * and ? are metacharacters. We use * to match 0 or
more characters, a question mark ? matches with single character
$ls ch*.doc
Displays all the files whose name start with ch and ends with .doc:
ch01-1.doc ch010.doc ch02.doc ch03-2.doc ch04-1.doc ch040.doc ch05.doc
ch06-2.doc ch01-2.doc ch02-1.doc
Here * works as meta character which matches with any character. If you want to display all the files ending with
just .doc then you can use following command:
$ls *.doc
Hidden Files:
An invisible file is one whose first character is the dot or period character (.). UNIX programs (including the shell)
use most of these files to store configuration information. Some common examples of hidden files include the files:
• . profile: the Bourne shell ( sh) initialization script
• . kshrc: the Korn shell ( ksh) initialization script
• . cshrc: the C shell ( csh) initialization script
• . rhosts: the remote shell configuration file
To list invisible files, specify the -a option to ls:
Above command would open a file with the given filename. You would need to press key i to come into edit mode.
Once you are in edit mode you can start writing your content in the file as below:
Once you are done, do the following steps:
Press key esc to come out of edit mode.
Press two keys Shift + ZZ together to come out of the file completely.
Now you would have a file created with filemame in the current directory.
1.2.3 Editing Files:
You can edit an existing file using vi editor. We would cover this in detail in a separate course. But in short, you can
open existing file as follows:
$ vi filename
Once file is opened, you can come in edit mode by pressing key i and then you can edit file as you like.
If you want to move here and there inside a file then first you need to come out of edit mode by pressing key esc and
then you can use following keys to move inside a file:
• l key to move to the right side.
• h key to move to the left side.
• k key to move up side in the file.
• j key to move down side in the file.
So using above keys you can position your cursor where ever you want to edit.
Once you are positioned then you can use i key to come in edit mode.
Edit the file, once you are done press esc and finally two keys Shift + ZZ together to come out of the file
completely.
1.2.4 Display Content of a File:
You can use cat command to see the content of a file. Following is the simple example to see the content of above
created file:
$ cat filename This is unix file.... I created it for the first time.....
I'm going to save this content in this file.
$
You can display line numbers by using -b option along with cat command as follows:
$ cat filename -b
1 This is unix file....I created it for the first time.....
2 I'm going to save this content in this file.
$
Now you would find one more file copyfile in your current directory. This file would be exactly same as original
file filename.
1.2.7 Renaming Files:
To change the name of a file use the mv command. Its basic syntax is:
$ mv old_file new_file
Following is the example which would rename existing file filename to newfile:
$ mv filename newfile
$
The mv command would move existing file completely into new file. So in this case you would fine only newfile in
your current directory.
1.2.8 Deleting Files:
To delete an existing file use the rm command. Its basic syntax is:
$ rm filename
Caution: It may be dangerous to delete a file because it may contain useful information. So be careful while using
this command. It is recommended to use -i option along with rm command.
Following is the example which would completely remove existing file filename:
$ rm filename
$
your files. You can go in your home directory anytime using the following command:
$cd ~
Here ~ indicates home directory. If you want to go in any other user's home directory, then use the following
command:
$cd ~username
To determine where you are within the filesystem hierarchy at any time, enter the command pwd to print the current
working directory:
$pwd /user0/home/amrood
Here, directory is the absolute or relative pathname of the directory you want to create. For example, the command:
$mkdir mydir
Creates the directory mydir in the current directory. Here is another example:
$mkdir /tmp/test-dir
This command creates the directory test-dir in the /tmp directory. The mkdir command produces no output if it
successfully creates the requested directory.
If you give more than one directory on the command line, mkdir creates each of the directories. For example:
$mkdir docs pub
Creates the directories docs and pub under the current directory.
In such cases, you can specify the -p option to the mkdir command. It creates all the necessary directories for you. For
example:
$mkdir -p /tmp/amrood/test
Note: To remove a directory make sure it is empty which means there should not be any file or sub-directory inside this
directory.
You can create multiple directories at a time as follows:
$rmdir dirname1 dirname2 dirname3
$
Above command removes the directories dirname1, dirname2, and dirname2 if they are empty. The rmdir command
produces no output if it is successful.
1.3.6 Changing Directories
You can use the cd command to do more than change to a home directory: You can use it to change to any directory by
specifying a valid absolute or relative path. The syntax is as follows:
$cd dirname
Here, dirname is the name of the directory that you want to change to. For example, the command:
$cd /usr/local/bin
Changes to the directory /usr/local/bin. From this directory you can cd to the directory /usr/home/amrood using the
following relative path:
$cd ../../home/amrood
• Owner permissions: The owner's permissions determine what actions the owner of the file can perform on the
file.
• Group permissions: The group's permissions determine what actions a user, who is a member of the group that
a file belongs to, can perform on the file.
• Other (world) permissions: The permissions for others indicate what action all other users can perform on the
file.
ls -l /home/amrood
-rwxr-xr-- 1 amrood users 1024 Nov 2 00:10 myfile
The permissions are broken into groups of threes, and each position in the group denotes a specific permission, in this
order: read (r), write (w), execute (x):
• The first three characters (2-4) represent the permissions for the file's owner. For example -rwxr-xr- represents
that onwer has read (r), write (w) and execute (x) permission.
• The second group of three characters (5-7) consists of the permissions for the group to which the file belongs.
For example -rwxr-xr-- represents that group has read (r) and execute (x) permission but no write permission.
• The last group of three characters (8-10) represents the permissions for everyone else. For example -rwxr-xr-
represents that other world has read (r) only permission.
1. Read: Grants the capability to read i e. view the contents of the file.
2. Write: Grants the capability to modify or remove the content of the file.
3. Execute: User with execute permissions can run a file as a program.
1. Read: Access to a directory means that the user can read the contents. The user can look at the
filenames inside the directory.
2. Write: Access means that the user can add or delete files to the contents of the directory.
3. Execute: Executing a directory doesn't really make a lot of sense so think of this as a traverse
permission. A user must have execute access to the bin directory in order to execute ls or cd command.
$ls -l testfile
$ls -l testfile
ls -l testfile
ls -l testfile
$ls -l testfile
$ls -l testfile
$ls -l testfile
Changing Ownership:
Command : chown (The chown command stands for "change owner" and is used to change the owner of a file.)
basic syntax is as follows:
$ chown user filelist
The value of user can be either the name of a user on the system or the user id (uid) of a user on the system. For eg
$ chown amrood testfile $
The value of group can be the name of a group on the system or the group ID (GID) of a group on the system. For eg:
$ chgrp special testfile $
As a regular user, you do not have read or write access to this file for security reasons, but when you change your
password, you need to have write permission to this file. This means that the passwd program has to give you additional
permissions so that you can write to the file /etc/shadow.
Additional permissions are given to programs via a mechanism known as the Set User ID ( SUID) and Set Group ID ( SGID)
bits. When you execute a program that has the SUID bit enabled, you inherit the permissions of that program's owner.
Programs that do not have the SUID bit set are run with the permissions of the user who started the program.
This is true for SGID as well. Normally programs execute with your group permissions, but instead your group will be
changed just for this program to the group owner of the program.
The SUID and SGID bits will appear as the letter "s" if the permission is available. The SUID "s" bit will be located in the
permission bits where the owners execute permission would normally reside. For example, the command
$ ls -l /usr/bin/passwd
Which shows that the SUID bit is set and that the command is owned by the root. A capital letter S in the execute
position instead of a lowercase s indicates that the execute bit is not set. If the sticky bit is enabled on the directory,
files can only be removed if you are one of the following users:
• The owner of the sticky directory
• The owner of the file being removed
• The super user, root
To set the SUID and SGID bits for any directory try the following:
$ chmod ug+s dirname
The pr Command:
The pr command does minor formatting of files on the terminal screen or for a printer. For example, if you have a long
list of names in a file, you can format it onscreen into two or more columns.
The pr changes the format of the file only on the screen or on the printed copy; it doesn't modify the original file.
Following table lists some pr options:
Option Description
-k Produces k columns of output
-d Double-spaces the output (not on all pr versions).
-h "header" Takes the next item as a report header.
-t Eliminates printing of header and top/bottom margins.
-l PAGE_LENGTH Set the page length to PAGE_LENGTH (66) lines. Default number of lines of text 56.
-o MARGIN Offset each line with MARGIN (zero) spaces.
-w PAGE_WIDTH Set page width to PAGE_WIDTH (72) characters for multiple text-column output only.
Before using pr, here are the contents of a sample file named food
Let's use pr command to make a two-column report with the header Restaurants:
To print a file named food on the default printer, use the lp or lpr command, as in this example:
$lp food
The lp command shows an ID that you can use to cancel the print job or check its status. If you are using lp command,
you can use -nNum option to print Num number of copies. Along with the command lpr, you can use -Num for the same.
If there are multiple printers connected with the shared network, then you can choose a printer using dprinter option
along with lp command and for the same purpose you can use -Pprinteroption along with lpr command. Here printer is
the printer name.
You can specify either the ID of the request (displayed by lp or lpq) or the name of the printer.
$cancel laserp-575
To cancel whatever request is currently printing, regardless of its ID, simply enter cancel and the printer name:
$cancel laserp
The lprm command will cancel the active job if it belongs to you. Otherwise, you can give job numbers as arguments, or
use a dash (-) to remove all of your jobs:
$lprm 575
dfA575diamond dequeued
cfA575diamond dequeued
The lprm command tells you the actual filenames removed from the printer queue.
Option Description
-s Specify subject on command line.
-c Send carbon copies to list of users. List should be a comma-separated list of names.
-b Send blind carbon copies to list. List should be a comma-separated list of names.
Following is the example to send a test message to [email protected].
You are then expected to type in your message, followed by an "control-D" at the beginning of a line. To stop simply type
dot (.) as follows:
Hi,
This is a test .
Cc:
You can send a complete file using a redirect < operator as follows:
To check incoming email at your Unix system you simply type email as follows:
The name "grep" derives from the ed (a UNIX line editor) command g/re/p which means "globally search for a regular
expression and print all lines containing it."
A regular expression is either some plain text (a word, for example) and/or special characters used for pattern matching.
The simplest use of grep is to look for a pattern consisting of a single word. It can be used in a pipe so that only those
lines of the input files containing a given string are sent to the standard output. If you don't give grep a filename to read,
it reads its standard input; that's the way all filter programs work:
There are various options which you can use along with grep command:
Option Description
-l Print only the names of files with matching lines (letter "l")
Next, let's use a regular expression that tells grep to find lines with "carol", followed by zero or more other characters
abbreviated in a regular expression as ".*"), then followed by "Aug". Here we are using -i option to have case insensitive
search:
More than two commands may be linked up into a pipe. Taking a previous pipe example using grep, we can further
sort the files modified in August by order of size. The following pipe consists of the commands ls, grep, and sort:
Option Description
-n Sort numerically (example: 10 will sort after 2), ignore blanks and tabs.
This pipe sorts all files in your directory modified in August by order of size, and prints them to the terminal screen.
The sort option +4n skips four fields (fields are separated by blanks) then sorts the lines in numeric order.
The screen will fill up with one screenful of text consisting of lines sorted by order of file size. At the bottom of the
screen is the more prompt where you can type a command to move through the sorted text. When you're done with
this screen, you can use any of the commands listed in the discussion of the more program.
1.7 Unix Processes Management
When you execute a program on your UNIX system, the system creates a special environment for that program. This
environment contains everything needed for the system to run the program as if no other program were running on
the system. Whenever you issue a command in UNIX, it creates, or starts, a new process. When you tried out the ls
command to list directory contents, you started a process. A process, in simple terms, is an instance of a running
program. The operating system tracks processes through a five digit ID number known as the pid or process ID . Each
process in the system has a unique pid. Pids eventually repeat because all the possible numbers are used up and the
next pid rolls or starts over. At any one time, no two processes with the same pid exist in the system because it is the
pid that UNIX uses to track each process.
When you start a process (run a command), there are two ways you can run it:
• Foreground Processes
• Background Processes
Foreground Processes:
By default, every process that you start runs in the foreground. It gets its input from the keyboard and sends its
output to the screen. You can see this happen with the ls command. If I want to list all the files in my current
directory, I can use the following command:
$ls ch*.doc
This would display all the files whose name start with ch and ends with .doc:
ch01-1.doc ch010.doc ch02.doc ch03-2.doc
ch04-1.doc ch040.doc ch05.doc ch06-2.doc
ch01-2.doc ch02-1.doc
The process runs in the foreground, the output is directed to my screen, and if the ls command wants any input (which it does not),
it waits for it from the keyboard. While a program is running in foreground and taking much time, we cannot run any other commands
(start any other processes) because prompt would not be available until program finishes its processing and comes out.
Background Processes:
A background process runs without being connected to your keyboard. If the background process requires any keyboard input, it waits.
The advantage of running a process in the background is that you can run other commands; you do not have to wait until it completes
to start another!
The simplest way to start a background process is to add an ampersand ( &) at the end of the command.
This would also display all the files whose name start with ch and ends with .doc:
Here if the ls command wants any input (which it does not), it goes into a stop state until I move it into the foreground and give
it the data from the keyboard.
That first line contains information about the background process - the job number and process ID. You need to know the job number
to manipulate it between background and foreground.
If you press the Enter key now, you see the following:
The first line tells you that the ls command background process finishes successfully. The second is a prompt for another command.
$ps
PID TTY TIME CMD
18358 ttyp3 00:00:00 sh
18361 ttyp3 00:01:31 abiword
18789 ttyp3 00:00:00 ps
One of the most commonly used flags for ps is the -f ( f for full) option, which provides more information as shown in the following
example:
$ps -f
UID PID PPID C STIME TTY TIME CMD
amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one amrood 6739
3662 0 10:22:54 pts/6 0:00 second_one amrood 3662 3657 0
08:10:53 pts/6 0:00 -ksh
Column Description
UID User ID that this process belongs to (the person running it).
There are other options which can be used along with ps command:
Option Description
Ending a process can be done in several different ways. Often, from a console-based command, sending a CTRL+ C keystroke (the
default interrupt character) will exit the command. This works when process is running in foreground mode.
If a process is running in background mode then first you would need to get its Job ID using pscommand and after that you
can use kill command to kill the process as follows:
$ps -f
UID PID PPID C STIME TTY TIME CMD
amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one amrood
6739 3662 0 10:22:54 pts/6 0:00 second_one amrood
3662 3657 0 08:10:53 pts/6 0:00 -ksh
amrood 6892 3662 4 10:51:50 pts/6 0:00 ps -f
$kill 6738
Terminated
Here kill command would terminate first_one process. If a process ignores a regular kill command, you can use kill -9 followed
by the process ID as follows:
$kill -9 6738
Terminated
Each unix process has two ID numbers assigned to it: Process ID (pid) and Parent process ID (ppid). Each user process in the system
has a parent process.
Most of the commands that you run have the shell as their parent. Check ps -f example where this command listed both process
ID and parent process ID.
When a process is killed, a ps listing may still show the process with a Z state. This is a zombie, or defunct, process. The process
is dead and not being used. These processes are different from orphan processes.They are the processes that has completed execution
but still has an entry in the process table.
Daemons are system-related background processes that often run with the permissions of root and services requests from other
processes.
A daemon process has no controlling terminal. It cannot open /dev/tty. If you do a "ps -ef" and look at the tty field, all daemons will have
a ? for the tty.
More clearly, a daemon is just a process that runs in the background, usually waiting for something to happen that it is capable of
working with, like a printer daemon is waiting for print commands.
If you have a program which needs to do long processing then its worth to make it a daemon and run it in background.
$top
1.8 Unix Communication
When you work in a distributed environment then you need to communicate with remote users and you also need to
access remote Unix machines. There are several Unix utilities which are especially useful for users computing in a
networked, distributed environment. This course lists few of them:
The ping command sends an echo request to a host available on the network. Using this command you can check if
your remote host is responding well or not.
• The ping command is useful for the following:
• Tracking and isolating hardware and software problems.
• Determining the status of the network and various foreign hosts.
• Testing, measuring, and managing networks.
Syntax:
Following is the simple syntax to use ping command:
Above command would start printing a response after every second. To come out of the command you can terminate
it by pressing CNTRL + C keys.
Example:
Following is the example to check the availability of a host available on the network:
$ping google.com
PING google.com (74.125.67.100) 56(84) bytes of data.
64 bytes from 74.125.67.100: icmp_seq=1 ttl=54 time=39.4 ms
64 bytes from 74.125.67.100: icmp_seq=2 ttl=54 time=39.9 ms
64 bytes from 74.125.67.100: icmp_seq=3 ttl=54 time=39.3 ms
If a host does not exist then it would behave something like this:
$ping giiiiiigle.com
ping: unknown host giiiiigle.com
$
Above command would prompt you for login ID and password. Once you are authenticated, you would have access on the
home directory of the login account and you would be able to perform various commands.
Command Description
mput file list Upload more than one files from local machine to remove machine.
mget file list Download more than one files from remote machine to local machine.
Turns prompt off, by default you would be prompted to upload or download movies using
prompt off
mput or mget commands.
Dir List all the files available in the current directory of remote machine.
It should be noted that all the files would be downloaded or uploaded to or from current directories. If you want to upload your
files in a particular directory then first you change to that directory and then upload required files.
Example:
Following is the example to show few commands:
$ftp amrood.com
Connected to amrood.com.
220 amrood.com FTP server (Ver 4.9 Thu Sep 2 20:35:07 CDT 2009) Name
(amrood.com:amrood): amrood
331 Password required for amrood. Password:
230 User amrood logged in. ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls. total 1464
drwxr-sr-x 3 amrood group 1024 Mar 11 20:04 Mail drwxr-sr-x 2
amrood group 1536 Mar 3 18:07 Misc drwxr-sr-x 5 amrood
group 512 Dec 7 10:59 OldStuff drwxr-sr-x
2 amrood group 1024 Mar 11 15:24 bin
drwxr-sr-x 5 amrood group 3072 Mar 13 16:10 mpl
-rw-r--r-- 1 amrood group 209671 Mar 15 10:57 myfile.out drwxr-sr-x
3 amrood group 512 Jan 5 13:32 public drwxr-sr-x
3 amrood group 512 Feb 10 10:17 pvm3
226 Transfer complete. ftp> cd
mpl
250 CWD command successful. ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls. total 7320
-rw-r--r-- 1 amrood group 1630 Aug 8 1994 dboard.f
-rw-r----- 1 amrood group 4340 Jul 17 1994 vttest.c
-rwxr-xr-x 1 amrood group 525574 Feb 15 11:52 wave_shift
-rw-r--r-- 1 amrood group 1648 Aug 5 1994 wide.list
-rwxr-xr-x 1 amrood group 4019 Feb 14 16:26 fix.c
226 Transfer complete. ftp> get
wave_shift
200 PORT command successful.
150 Opening data connection for wave_shift (525574 bytes).
226 Transfer complete.
528454 bytes received in 1.296 seconds (398.1 Kbytes/s)
ftp> quit
221 Goodbye.
C:>telnet amrood.com
Trying...
Connected to amrood.com. Escape
character is '^]'.
{ do your work }
$ logout
Connection closed. C:>
The finger command displays information about users on a given host. The host can be either local or remote.
$ finger
Login Name Tty Idle Login Time Office
amrood pts/0 Jun 25 08:03 (62.61.164.115)
$ finger amrood
Login: amrood Name: (null) Directory:
/home/amrood Shell: /bin/bash
On since Thu Jun 25 08:03 (MST) on pts/0 from 62.61.164.115
No mail.
No Plan.
$ finger @avtar.com
Login Name Tty Idle Login Time Office
amrood pts/0 Jun 25 08:03 (62.61.164.115)
$ finger [email protected]
Login: amrood Name: (null) Directory:
/home/amrood Shell: /bin/bash
On since Thu Jun 25 08:03 (MST) on pts/0 from 62.61.164.115
No mail. No Plan.
Syntax:
Here is the simple command to get the detail of any Unix command while working with the system:
$man command
Example:
Now you imagine any command for which you want to get help. Assuming you want to know about pwd then you simply need
to use the following command:
$man pwd
The above command would open a help for you which would give you complete information about pwd command. Try it yourself
at your command prompt to get more detail on
You can get complete detail on man command itself using the following command:
$man man
Lists other commands that are directly related to the command in the man page or closely
SEE ALSO
resembling its functionality.
BUGS Explains any known issues or bugs that exist with the command or its output
EXAMPLES Common usage examples that give the reader an idea of how the command can be used.
A UNIX filesystem is a collection of files and directories that has the following properties:
• It has a root directory (/) that contains other files and directories.
• Each file or directory is uniquely identified by its name, the directory in which it resides, and a unique identifier,
typically called an inode.
• By convention, the root directory has an inode number of 2 and the lost+found directory has an inode number of 3.
Inode numbers 0 and 1 are not used. File inode numbers can be seen by specifying the -i option to ls command.
• It is self contained. There are no dependencies between one filesystem and any other.
The directories have specific purposes and generally hold the same types of information for easily locating files. Following are
the directories that exist on the major versions of Unix:
Directory Description
This is the root directory which should contain only the directories needed at the top level of the file
/
structure.
/bin This is where the executable files are located. They are available to all user.
Supervisor directory commands, configuration files, disk configuration files, valid user lists, groups,
/etc
ethernet, hosts, where to send critical messages.
/lib Contains shared library files and sometimes other kernel-related files.
/home Contains the home directory for users and other accounts.
Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy
/mnt
diskette drive, respectively
Contains all processes marked as a file by process number or other information that is dynamic to the
/proc
system.
Used for miscellaneous purposes, or can be used by many users. Includes administrative commands,
/usr
shared files, library files, and others
Typically contains variable-length files such as log and print files and any other type of file that may
/var
contain a variable amount of data
Contains binary (executable) files, usually for system administration. For examplefdisk
/sbin
and ifconfig utlities.
Command Description
You can use Manpage Help to check complete syntax for each command mentioned here.
$df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vzfs 10485760 7836644 2649116 75% /
/devices 0 0 0 0% /devices
$
Some of the directories, such as /devices, shows 0 in the kbytes, used, and avail columns as well as 0% for capacity.
These are special (or virtual) file systems, and although they reside on the disk under /, by themselves they do not take up disk
space.
The df -k output is generally the same on all Unix systems. Here's what it usually includes:
Column Description
You can use the -h (human readable) option to display the output in a format that shows the size in easier-to- understand notation.
$du /etc
10 /etc/cron.d
126 /etc/default
6 /etc/dfs
...
$
$du -h /etc
5k /etc/cron.d
63k /etc/default
3k /etc/dfs
...
$
$ mount
/dev/vzfs on / type reiserfs (rw,usrquota,grpquota)
proc on /proc type proc (rw,nodiratime)
devpts on /dev/pts type devpts (rw)
$
The /mnt directory, by Unix convention, is where temporary mounts (such as CD-ROM drives, remote network drives, and
floppy drives) are located. If you need to mount a file system, you can use the mount command with the following syntax:
For example, if you want to mount a CD-ROM to the directory /mnt/cdrom, for example, you can type:
This assumes that your CD-ROM device is called /dev/cdrom and that you want to mount it to /mnt/cdrom. Refer to the mount
man page for more specific information or type mount -h at the command line for help information.
After mounting, you can use the cd command to navigate the newly available file system through the mountpoint you just made.
$ umount /dev/cdrom
The mount command enables you to access your file systems, but on most modern Unix systems, the automount function makes
this process invisible to the user and requires no intervention.
Quotas operate around two limits that allow the user to take some action if the amount of space or number of disk blocks start to
exceed the administrator defined limits:
• Soft Limit: If the user exceeds the limit defined, there is a grace period that allows the user to free up some space.
• Hard Limit: When the hard limit is reached, regardless of the grace period, no further files or blocks can be allocated.
edquota This is a quota editor. Users or Groups quota can be edited using this command.
quotacheck Scan a filesystem for disk usage, create, check and repair quota files
This announces to the system that disk quotas should be enabled on one or more
quotaon
filesystems.
This announces to the system that disk quotas should be disabled off one or more
quotaoff
filesystems.
repquota This prints a summary of the disc usage and quotas for the specified file systems
You can use Manpage Help to check complete syntax for each command mentioned here.
$man command
Command Description
Tr Translate characters
Command Description
Command Description
Command Description
Some of these commands may be restricted at your computer for security reasons.
1.11.6 Messages between Users:
The UNIX systems support on-screen messages to other users and world-wide electronic mail:
Command Description
Command Description
Cb C program beautifier
Command Description
Umask Show the permissions that are given to view files by default
The most of the part of this course covered Bourne Shell but this page list down all the mathematical builtiin functions available in
Korn Shell.
The Korn shell provides access to the standard set of mathematical functions. They are called using C function call syntax.
Function Description
Sin Sine
Asin Arc sine
Cos Cosine
Tan Tangent