OSY Practical
OSY Practical
i. date
ii. time
iii. cal
iv. clear
v. banner
vi. tty
vii. script
viii. man
Ans b)
date //display current date
date –u //display formatted current with time zone
date “+%Y/%m/%d” //display date in format year/month/day
2.Execute command to start, stop, restart a particular service of linux
system. List all services present in system with the help of command.
Ans a)
4. cut: Removes sections from each line of files and outputs the
result. Commonly used to extract columns from a file.
6. aspell: A spell checker that can check the spelling of text in files
and offer suggestions for corrections.
6. aspell: A spell checker that can check the spelling of text in files
and offer suggestions for corrections.
7. sort: Sorts the lines of a file in alphabetical or numerical order.
It can also sort based on specific columns or delimiters.
8. grep: Searches for patterns in a file and prints matching lines. It
is widely used for pattern matching in files and outputs.
5.Write down shell script for if statement where accept the subject name
and mark subject should be Linux.
ANS:
# Print stars
for ((k=1; k<=i; k++))
do
echo -ne "* "
done