Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17

Chapter 1: Getting Started:

1) Logging with user name & password


2) Date: (displays the date & time
3) Clear: ( Clear the screen)
4) Cal: (The Calendar)
5) Cal 4 2009: ( it will displays the April of 2009)
6) Who : (who are the users logged into the system)
7) Ls: (listing files)
8) Ls chap* :(it will displays the similar file names)
9) Ls –l : (list of the file names is not enough you need to know more about these files.
10) Ls >list :(Directing Output to a file)
11) Ls –lt |more ( it will shows page by page)
12) huxd0275:/home# ls -Fx | wc ( Identifying directories and Executables (-F))
13 78 977
huxd0275:/home# ls -axF | wc ( Showing hidden files also (-a)
14 80 995
13) Cat dept.lst : (it will displays the list file contents)
14) Wc list ; ( Counting number of lines in a file)
15) Ls | wc : (feeding out of one command to another)
16) Programming with shell: X=5, echo $x
17) Exit: (Signing off)

Chapter 4: General Purpose Utilities

1) Date : displaying the system date.

Ex: Date +%m =12 , date +%h =Dec and date +”%h %m”

2) Echo: (displaying the message)

Ex: Echo “company CTS”

3) Printf : (an alternative to echo)

4) ‘bc : the calculator

5) Tty (teletype) tells you the device name of your terminal

huxd0275:/home/p1216319/venkat# tty

/dev/pts/0

6) Uname: ( which operating system running on your machine)


Uname –r (it will displays the operating system version)

Uname –n (it will displays machine name)

Chapter 5: File system:

1) The HOME variable: the home directory: UNIX automatically places you in a directory called the
home directory.

UNIX Variable:

Echo $PATH, $SHELL, $HOME

huxd0275:/home/p1216319/venkat# echo $SHELL


/usr/bin/ksh
huxd0275:/home/p1216319/venkat# echo $HOME
/home/p1216319
huxd0275:/home/p1216319/venkat# echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/p1216319/bin:/usr/bin/X11:/sbin:.

2) Pwd: present working directory

3) Cd : change directory

4) Mkdir: making directory

5) Rmdir: removing directory

Rmdir directory name

Chapter 6: Handling Ordinary Files:

1) cat : displaying and creating files (Concatenates a set of files. Is also used to list a file)

2) cat : creating a file cat >? Foo ctrl –d

3) cp: coping a file cp file1 file2 , cp file1 file2 file3 file4 pros

cp file1 /home/p1216319/file1
Coping directory structure : cp -R dir1 dir2

4) Deleting files: rm : (we can delete singe file or multiple files)


Eg: rm file1 file2 file2
Eg: rm * ( all files will delete)

Interactive deletion (-i): ask for user conforamtion

eg: rm –i file1 file2 file3

Forcing Removal (-f): Overrides the minor protection

Eg: rm –f file name

6) Mv : command to move a file into another directory. Also rename an existing file or directory
with the mv command

Syntax

mv source-filename destination-directory

mv oldDirectory newDirectory

Common Options -i confirm overwrite

5) head

displays the top lines of the file. By default prints top 10 lines. Has a numeric switch.
E.g.
huxd0275:/home/p1216319/venkat# head -n 3 emp.lst
2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000

6) tail

displays the bottom lines of the file. By default prints bottom 10 lines.

E.g.
huxd0275:/home/p1216319/venkat# tail -3 emp.lst
3564|sudir |executive|personal|06/11/77|7500
2345|j.prassanna |g.m |marketing|31/12/76|8000
0110|v.k.sham |g.m |marketing|12/31/74|9000
This will display bottom 3 lines from the emp.lst file.

Cut: while head and tail splits a file horizontally, cut is used to slice a file vertically
cut identifies both columns and fields
Cutting columns: (-c)
huxd0275:/home/p1216319/venkat# cut -c 5-10 emp.lst
|a.ksh
|jai s
|sumit
|sudir
|j.pra
|v.k.s
Cutting Fields (-f):
huxd0275:/home/p1216319/venkat# cut -d \| -f 2,3 emp.lst
a.kshukla |g.m
jai sharma |director
sumit chakrvarthy |d.g.m
sudir |executive
j.prassanna |g.m
v.k.sham |g.m

7) Paste: Pasting files:


while cat joins files horizontally, paste is used to join files vertically

The default delimiter between the columns in a paste is a tab, but options allow
other delimiters to be used.

Before that we need to create cutlist1 file


huxd0275:/home/p1216319/venkat# paste cutlst cutlist1
a.kshukla |g.m | sales
jai sharma |director|production
sumit chakrvarthy |d.g.m | marketing
sudir |executive|personal
j.prassanna |g.m |marketing
v.k.sham |g.m |marketing

8) Sort:
huxd0275:/home/p1216319/venkat# cat emp.lst
2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
3564|sudir |executive|personal|06/11/77|7500
2345|j.prassanna |g.m |marketing|31/12/76|8000
0110|v.k.sham |g.m |marketing|12/31/74|9000
huxd0275:/home/p1216319/venkat# sort emp.lst
0110|v.k.sham |g.m |marketing|12/31/74|9000
2233|a.kshukla |g.m | sales |12/12/78|6000
2345|j.prassanna |g.m |marketing|31/12/76|8000
3564|sudir |executive|personal|06/11/77|7500
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
9876|jai sharma |director|production|12/03/80|7000

Soring on primary key(-k): sorting on field 2 as primary key here


huxd0275:/home/p1216319/venkat# sort -t"|" -k 2 emp.lst
2233|a.kshukla |g.m | sales |12/12/78|6000
2345|j.prassanna |g.m |marketing|31/12/76|8000
9876|jai sharma |director|production|12/03/80|7000
3564|sudir |executive|personal|06/11/77|7500
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
0110|v.k.sham |g.m |marketing|12/31/74|9000

Reverse sorting : huxd0275:/home/p1216319/venkat# sort -t"|" –r -k 2 emp.lst


huxd0275:/home/p1216319/venkat# sort -t"|" -r -k 2 emp.lst
0110|v.k.sham |g.m |marketing|12/31/74|9000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
3564|sudir |executive|personal|06/11/77|7500
9876|jai sharma |director|production|12/03/80|7000
2345|j.prassanna |g.m |marketing|31/12/76|8000
2233|a.kshukla |g.m | sales |12/12/78|6000

Sorting columns : sort -t"|" -k 5.7, 5.8 emp.lst


 Sorting starts on 7 column of the 5th filed and 8 th column of 5 field.
huxd0275:/home/p1216319/venkat# sort -t"|" -k 5.7, 5.8 emp.lst
sort: 0653-655 Cannot open 5.8
0110|v.k.sham |g.m |marketing|12/31/74|9000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
2345|j.prassanna |g.m |marketing|31/12/76|8000
3564|sudir |executive|personal|06/11/77|7500
2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000

9) I/O redirection:
huxd0275:/home/p1216319/venkat# cat dept.lst >> dept.lst1

10) Uniq: locate repeated and nonreplaced lines

huxd0275:/home/p1216319/venkat# sort dept.lst | uniq – uniqlist

huxd0275:/home/p1216319/venkat# cat uniqlist


01|accounts|6213
02|progs|5423
03|marketing|6521
04|personnel|2365
05|production|9876
06|sales|1006

11) Tr: translating characters: It replaces pipe | with ~{till)

huxd0275:/home/p1216319/venkat# tr '|/' '~~' < emp.lst1 | head -n 3


2233~a.kshukla ~g.m ~ sales ~12~12~78~6000
9876~jai sharma ~director~production~12~03~80~7000
5678~sumit chakrvarthy ~d.g.m ~ marketing~19~05~75~6000

12) Finger

reports who is logged into a specific machine.

huxd0275:/home/p1216319/venkat# finger
Login Name TTY Idle When Site Info
p1216319 Venkatreddy Vennapus p0 Thu 09:22

Provides details on a single user


displays the .plan file of a specific user
Common Options
-l force long output format
-m match username only, not first or last names
-s force short output format

7) Script: To record your login session in a file (default file is typescript).

E.g. $> script


script started, file is typescript
$> exit
script done, file is typescript

huxd0275:/home/p1216319/venkat# script -a
Script command is started. The file is typescript.
$ script logfile
Script command is started. The file is logfile.
$ exit
Script command is complete. The file is logfile.
$
Script command is complete. The file is typescript.
Options
Script -a append to existing typescript file
Script logfile use <file> instead of default file typescript

13) tee
Sends standard input to specified files and also to standard out. It’s often used in
command pipelines. To view and save the output from a command.

E.g. cut -c 5-10 emp.lst | tee shortlst

cal 1998 | tee -a calen > calenold

14) less : eg: less filename .


Displays the contents of the file to the standard output (one screen at a time).
Less logfile will displays dynamically the logfile

15) man; If you have problem with command usage, use the man command
man command_name

File Manipulation Commands:


1) split

Splits a large file into more manageable files.


All segments appear as separate files in the same directory.
By default, splitting is done into 1000-line pieces.
The files created are in the following sequence: xaa, xab, xac, xad.. .. xzz for a maximum
of 676 files
E.g. split -100 datafile my
This creates myaa myab, myac.. etc with a max of 100 lines

Eg1: In this simple example, assume myfile is 3,000 lines long: split myfile

split -l 500 myfile segment


This will output six 500-line files: segmentaa, segmentab, segmentac, segmentad, segmentae, and
segmentaf.

Eg2: myfile is a 160KB file: split -b 40k myfile segment

This will output four 40KB files: segmentaa, segmentab, segmentac, and segmentad.

#Test if the the files exist


cd /oesdba/ib_dps/ofa_prod/apps/dims/
if test -r CPPCPDWKLY_*.txt
then rm CPPCPDWKLY_*.txt
fi

if test -r CPPCPDWKLYorg.txt
then rm CPPCPDWKLYorg.txt
fi

#Test if the the file size is more than 2 GB

# Split the file


#split -b 2000000000 CPPCPDWKLY.txt

#Modified to Split the file based on lines on 26May06


Line=`cat CPPCPDWKLY.txt | wc -l`
No_Line=`expr $Line / 2 + 1`
split -l $No_Line CPPCPDWKLY.txt

# Rename the files


mv xaa CPPCPDWKLY_1.txt
mv xab CPPCPDWKLY_2.txt
mv CPPCPDWKLY.txt CPPCPDWKLYorg.txt

2) touch newfile.txt (Changing the time stamp)


Creates a file known as "newfile.txt", if the file does not already exist. If the file already exists
the accessed / modification time is updated for the file newfile.txt

3) cmp : comparing two files


Compares two files, and (without options) reports the location of the first difference between
them. Eg: cmp file1 file2 , cmp –l file1 file2( line by line compare)

It can deal with both binary and ASCII file comparisons.


It does a byte-by-byte comparison

4) comm: What is common?

Compares two sorted files, and compares each line of the first with each line of the second and
reports commonalties and difference between them.
It produces a 3 column output
first column show lines unique in the first file
2nd column show lines unique in the second file
3rd column show common lines in both files
Eg:
huxd0275:/home/p1216319/venkat# comm emp.lst emp.lst1
2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
3564|sudir |executive|personal|06/11/77|7500
2345|j.prassanna |g.m |marketing|31/12/76|8000
0110|v.k.sham |g.m |marketing|12/31/74|9000

5) diff :
compares two files, directories, etc, and reports all differences between the two.

It deals only with ASCII files.

It’s output format is designed to report the changes necessary to convert the first file into the
second.

huxd0275:/home/p1216319/venkat# diff emp.lst dept.lst


1,6c1,6
< 2233|a.kshukla |g.m | sales |12/12/78|6000
< 9876|jai sharma |director|production|12/03/80|7000
< 5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
< 3564|sudir |executive|personal|06/11/77|7500
< 2345|j.prassanna |g.m |marketing|31/12/76|8000
< 0110|v.k.sham |g.m |marketing|12/31/74|9000
---
> 01|accounts|6213
> 02|progs|5423
> 03|marketing|6521
> 04|personnel|2365
> 05|production|9876
> 06|sales|1006 Options

-b ignore trailing blanks

-i ignore case of letters

6) compress and Uncompress :

(-f) force compression of file

(-v) Shows you how much the file shrank in size

huxd0275:/home/p1216319/venkat# compress -v emp.lst1

emp.lst1: Compression: 29.32% This file is replaced with emp.lst1.Z.


7) Zip & unzip : first argument to be the compressed filename

Ex : zip archive.zip file1 file2 (deflated)

Unzip archive.zip (inflated)

Viewing the archive (-v): ex: unzip –v archieve.zip

8) Gzip and gunzip:

Very popular program that works one or more filenames. It provides the extension .gz to the
compressed filename and removes the original file.

Ex: gzip file_name


Ls –lt : file_name.gz
Gunzip file_name.gz

9) Reporting Free Space : Disk Df –k . : This will gives the disk space for the current directory

Eg:

huxd0275:/home/p1216319/venkat# df -k .
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd1 1048576 1046688 1% 279 1% /home

10) Reporting Desk usage: Du : desk usage . this command will report the recursive examination of
the directory tree

huxd0275:/home/p1216319/venkat# du /home/p1216319
96 /home/p1216319/venkat
120 /home/p1216319

Access Control
1) File Permissons:
huxd0275:/home/p1216319/venkat# ls -lt
total 88
-rwxr-xr-x 1 p1216319 staff 253 Jul 23 09:59 emp.lst1.Z
-rw-r--r-- 1 p1216319 staff 102 Jul 23 09:49 uniqlist

2) Chmod: changing the file permissions


huxd0275:/home/p1216319/venkat# chmod 777 cutlist1
huxd0275:/home/p1216319/venkat# ls -lt
total 88
-rwxr-xr-x 1 p1216319 staff 253 Jul 23 09:59 emp.lst1.Z
-rw-r--r-- 1 p1216319 staff 102 Jul 23 09:49 uniqlist
-rw-r--r-- 1 p1216319 staff 202 Jul 23 09:44 dept.lst1
-rw-r--r-- 1 p1216319 staff 92 Jul 23 08:25 user.lst
-rw-r--r-- 1 p1216319 staff 481 Jul 23 08:22 typescript
-rw-r--r-- 1 p1216319 staff 128 Jul 23 08:20 logfile
-rwxrwxrwx 1 p1216319 staff 1 Jul 23 08:13 cutlist1
-rw-r--r-- 1 p1216319 staff 244 Jul 23 08:12 cutlst
-rw-r--r-- 1 p1216319 staff 184 Jul 23 08:06 shortlst
-r-xr-xr-x 1 p1216319 staff 253 Jul 23 07:57 emp.lst.Z
-rw-r--r-- 1 p1216319 staff 102 Jul 23 06:51 dept.lst.Z

E-mail & FTP stands for file transfer protocol:

huxd0275:/home/p1216319/venkat# ftp huxd0251.unix


Connected to huxd0251.unix.marksandspencerdev.com.
220 huxd0251 FTP server (Version 4.2 Fri May 2 12:48:10 CDT 2008) ready.
Name (huxd0251.unix:p1216319): p1216319
331 Password required for p1216319.
Password:xxxxxxx
230-Last unsuccessful login: Mon 15 Jun 06:10:04 2009 on ssh from
mshsrmnsukp0014.mnsuk.adroot.marksandspencer.com
230-Last login: Fri 17 Jul 06:25:59 2009 on /dev/pts/1 from
mshsrmnsukp0014.mnsuk.adroot.marksandspencer.com
230 User p1216319 logged in.
ftp> pwd
257 "/home/p1216319" is current directory.
ftp> mkdir venkat
257 MKD command successful.
ftp> cd venkat
250 CWD command successful.
ftp> pwd
257 "/home/p1216319/venkat" is current directory.
ftp> mput *
mput cutlist1? y
200 PORT command successful.
150 Opening data connection for cutlist1.
226 Transfer complete.

E-mail
huxd0275:/home/p1216319/venkat# mail
Venkatreddy.Vennapusa@marksandspencer.com

Subject: hi

how r u

Cc:(ctrl- D)

Status Commands
1)stty

huxd0275:/home/p1216319/venkat# stty –a

The stty command sets certain terminal I/O options for the device that is the current standard
input

speed 38400 baud; 44 rows; 126 columns;


eucw 1:1:0:0, scrw 1:1:0:0:
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; reprint = ^R
discard = ^O; werase = ^W; lnext = ^V
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo -echoe -echok -echonl -noflsh
-tostop -echoctl -echoprt -echoke -flusho -pending -iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
You have mail in /usr/spool/mail/p1216319

3) Find : locating the files


All files with extension with .lst:
huxd0275:/home/p1216319/venkat# find . -name "*.lst" -print
./user.lst
./emp.lst

It shows the . also and displays hidden directory also:

huxd0275:/home/p1216319/venkat# cd; find . -type d -print


.
./venkat

Finding the unused files: some of the files unaccessed or unmodified for months

huxd0275:/home/p1216319# find . -mtime -2 -print


.
./.sh_history
./venkat
./venkat/emp.lst1.Z
./venkat/dept.lst.Z
./venkat/shortlst
./venkat/cutlst
./venkat/cutlist1
./venkat/logfile
./venkat/typescript
./venkat/user.lst
./venkat/dept.lst1
./venkat/uniqlist
./venkat/emp.lst
./.vi_history

Filters : (sed and grep)


1) grep : searching for input pattern. To search for generalized regular expressions occurring
in Unix files.

eg: huxd0275:/home/p1216319/venkat# grep "sales" emp.lst


2233|a.kshukla |g.m | sales |12/12/78|6000

Options

-i ignore case :

huxd0275:/home/p1216319/venkat# grep -i 'Sham' emp.lst


0110|v.k.sham |g.m |marketing|12/31/74|9000
-n display the line number along with the line on which a match was found

huxd0275:/home/p1216319/venkat# grep -n 'marketing' emp.lst


3:5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
5:2345|j.prassanna |g.m |marketing|31/12/76|8000
6:0110|v.k.sham |g.m |marketing|12/31/74|9000

-l list filenames, but not lines, in which matches were found

huxd0275:/home/p1216319/venkat# grep -l 'marketing' *.lst*


dept.lst
dept.lst1
emp.lst
emp.lst1

-c report only a count of the number of lines containing matches


huxd0275:/home/p1216319/venkat# grep -c 'director' emp*.lst*
emp.lst:1
emp.lst1:1

Filters using Regular Expression: SED and GREP


SED: the stream editor: It is a multipurpose tool which combines the work of several filters
Ex:
Line addressing
1) sed ‘3q’ emp.lst ( first 3 lines of the file. It simulates head –n 3)
1) Sed –n ‘1,2p’ emp.lst (prints first 2 lines)
2) Sed –n ‘9,11p’ emp.lst (prints 9 to 11 lines)
Context Addressing
1) Sed –n ‘/directory/p’ emp.lst
Substitutions : Substitution is most important feature of sed
1) Sed ‘s/|/:/’ emp.lst | head -2 ( it will replaces pipe | with : colons)
2) Sed ‘s/|/:/g’ emp.lst | head -2

3) sed: The Stream editor :


huxd0275:/home/p1216319/venkat# sed '3q' emp.lst
2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000

huxd0275:/home/p1216319/venkat# sed -n '1,3p' emp.lst


2233|a.kshukla |g.m | sales |12/12/78|6000
9876|jai sharma |director|production|12/03/80|7000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000

Select the last line of file:


huxd0275:/home/p1216319/venkat# sed -n '$p' emp.lst
0110|v.k.sham |g.m |marketing|12/31/74|9000

Advanced filter : awk


huxd0275:/home/p1216319/venkat# awk '/g.m/ { print }' emp.lst
2233|a.kshukla |g.m | sales |12/12/78|6000
5678|sumit chakrvarthy |d.g.m | marketing|19/05/75|6000
2345|j.prassanna |g.m |marketing|31/12/76|8000
0110|v.k.sham |g.m |marketing|12/31/74|9000

huxd0275:/home/p1216319/venkat# awk '{print $3}' emp.lst


|
|director|production|12/03/80|7000
|d.g.m

|marketing|31/12/76|8000
|marketing|12/31/74|9000

Process
1) ps : command : process statues

huxd0275:/home/p1216319# ps
PID TTY TIME CMD
311430 pts/0 0:00 ps
626818 pts/0 0:00 -ksh

PID: process id
TTY: terminal name
TIME: Cumulative process time
CMD: Process name

Full listing of process:


huxd0275:/home/p1216319# ps -f
UID PID PPID C STIME TTY TIME CMD
p1216319 311478 626818 0 07:09:22 pts/0 0:00 ps -f
p1216319 626818 94398 1 06:49:25 pts/0 0:00 –ksh

Displaying the all user process :


huxd0275:/home/p1216319# ps -a
PID TTY TIME CMD
311352 pts/0 0:00 ps
Displaying all the user and system process :
huxd0275:/home/p1216319# ps -e
PID TTY TIME CMD
1 - 5:10 init
82014 - 0:00 errdemon
86102 - 64:54 syncd

Useful Business Object commands :


huxd0275:/home/boadmin# ps -ef | grep cms
root 135332 1 0 May 29 - 0:00 /usr/sbin/srcmstr
boadmin 786504 1 0 May 29 - 0:00 /bin/sh
/opt/BO/boxir2/bobje/enterprise115/generic/bobjrestart.sh
/opt/BO/boxir2/bobje/enterprise115/aix_rs6000/boe_cmsd -name huxd0275.cms -port
10.144.37.217 -loggingPath /opt/BO/boxir2/bobje/logging -pidFile
/opt/BO/boxir2/bobje/serverpids/huxd0275.cms_cms.pid -dbrestart_nocore -restart -fg
boadmin 889024 786504 9 May 29 - 586:11
/opt/BO/boxir2/bobje/enterprise115/aix_rs6000/boe_cmsd -name huxd0275.cms -port
10.144.37.217 -loggingPath /opt/BO/boxir2/bobje/logging -pidFile
/opt/BO/boxir2/bobje/serverpids/huxd0275.cms_cms.pid -dbrestart_nocore -restart -fg –fg

Running the job in back ground :


huxd0275:/home/p1216319/venkat# nohup sort emp.lst &
[1] 397522
huxd0275:/home/p1216319/venkat# Sending nohup output to nohup.out.

[1] + Done nohup sort emp.lst &


huxd0275:/home/p1216319/venkat# jobs

2) Kill: premature termination of a process/job

Kill –l
(-l) displays the available kill signals

huxd0275:/home/p1216319/venkat# kill -l
1) HUP 14) ALRM 27) MSG 40) bad trap 53) bad trap
2) INT 15) TERM 28) WINCH 41) bad trap 54) bad trap
3) QUIT 16) URG 29) PWR 42) bad trap 55) bad trap
4) ILL 17) STOP 30) USR1 43) bad trap 56) bad trap
5) TRAP 18) TSTP 31) USR2 44) bad trap 57) bad trap
6) ABRT 19) CONT 32) PROF 45) bad trap 58) RECONFIG
7) EMT 20) CHLD 33) DANGER 46) bad trap 59) CPUFAIL
8) FPE 21) TTIN 34) VTALRM 47) bad trap 60) GRANT
9) KILL 22) TTOU 35) MIGRATE 48) bad trap 61) RETRACT
huxd0275:/home/p1216319/venkat# kill -9 pid

3) Nice: Used to reduce the processing priority of a Job/command


huxd0275:/home/p1216319/venkat# nice -5 echo `man man` | wc -c&
[1] 233504
huxd0275:/home/p1216319/venkat# 14318
4)
[1] + Done nice -5 echo `man man` | wc -c&

• minute (0-59),
• hour (0-23),

Cron job Scheduling :

Below example of cron job will removes the tmp files


from /home/someuser/tmp each day at 6:30 PM.

30 18 * * * rm /home/someuser/tmp/*

Temp file directory

Day Of The Week (0-6 With 0=Sunday)

Month of the year (1-12)

Day of The Month (1-31)

Hour (0-23)

minute (0-59

You might also like