Assignment3 Complexproblems
Assignment3 Complexproblems
Assignment3 Complexproblems
UID- 20BCA1658
1. Mention the commands only to create myvdo with 5G logical size. please take
/dev/vdc for that. format the volume with xfs file system. and mount it on /mnt/storage
permanently.
Main Features of XFS
XFS supports metadata journaling, which facilitates quicker crash recovery.
The XFS file system can be defragmented and enlarged while mounted and
active.
In addition, Red Hat Enterprise Linux 7 supports backup and restore utilities
specific to XFS.
Allocation Features
XFS features the following allocation schemes:
Extent-based allocation
Stripe-aware allocation policies
Delayed allocation
Space pre-allocation
2. Create a 500MB extended partition. then Create a 1GB primary partition check df -h
and lsblk command. Later delete extended partition and create a 1MB primary
partition then change type to linux lvm and then save it.
To combine multiple files into a single archive file (for example, my_files.tar), use
the following command (replace file1 and file2 with the names of the files you
want to combine):
To combine all the files in a directory into a single archive file (for
example, my_files.tar), use the following command
(replace /path/to/my/directory with the absolute path to the directory containing
the files you want to combine):
# !/bin/bash
# Take user Input
echo "Enter Two numbers : "
read a
read b
# Input type of operation
echo "Enter Choice :"
echo "1. Addition"
echo "2. Subtraction"
echo "3. Multiplication"
echo "4. Division"
read ch
# Switch Case to perform
# calculator operations
case $ch in
1)res=`echo $a + $b | bc`
;;
2)res=`echo $a - $b | bc`
;;
3)res=`echo $a \* $b | bc`
;;
4)res=`echo "scale=2; $a / $b" | bc`
;;
esac
echo "Result : $res"