Wednesday 23 September 2015

add user and create group LINUX



#Assignment noA3
Roll no:
Batch  :
ch=1
  while [ $ch  -eq 1 ]
  do 
    echo "1.Add user"
    echo "2.Add group "
    echo "3.adding user to group "
    echo "4.check the content of group "
    echo "5.check the info of user"
    echo "6.change owner"
    echo "7.change group"
    echo "plz enter u r choice"
    read no

Wednesday 9 September 2015

adding user and access permission

#################################################
# assignment no: 3
# title :adding user and access permission
# date:4-8-2015
# iName: Kishor Sonawane
#################################################
cnt=1
while [ $cnt -eq 1 ]
do

DIR operation

# Program: DIR operation
# Name:    Kishor M Sonawane
# Roll No: 115
#
ch=1
while [ $ch -ne 0 ]
do

Create DIR and Change DIR

# proram : Create DIR and Change DIR
# Name :   kishor Sonawane

ch=1
while [ $ch -ne 0 ]
do

TO display the list of Device mound And umount

#####################################################
# TO display the list of Device  mound And umount
# Date: 14/07/2015
# Autor : Kishor Sonawane
#####################################################
ch=1
while [ $ch -ne 0 ]
do
echo "__________________________________"
echo "0.exitprogram"
echo "1.diplya all Device"
echo "2.USB Device"
echo "3.CPU Info"
echo "4.Disk Use"
echo "5.Mount Device"
echo "6. Umount Device"
echo "7.Exit Shell"
echo "_________________________________"
echo "Enter choice:"
read ch
case $ch in

# Display All Device
   1)   clear
    echo "-:ALL Devices:-"
    echo "_________________________________"
        # device to Desplay
        lspci -v
        # periferal Device Interface
        # all periferal device
    echo "_________________________________"
      ;;
# All USB info
   2)   clear
        echo "USb Device"
    echo "_________________________________"
        lsusb
    echo "_________________________________"
      ;;
# cpu Information
  3)   clear
    echo "CPU info"
        echo "_________________________________"
        lscpu
        echo "_________________________________"
      ;;

# Disk uses 
 4)     clear
    echo "Disk Use's"
    echo "_________________________________"  
        df
    echo "_________________________________"     
;;
#   mount Device
5)   clear
     echo "Disk Details"
     df
     echo "Enter the Disk name(use Disk Details):"
     read dn
     echo "Enter the Path of you want Mounting:"
     read path
     sudo mount $dn $path
     echo "you want show mounting folder: (1=yes 0=no)"
     read y
     if [ $y -eq 1 ]
      then
      echo "_________________________________"
      echo  $dn,"to--->",$path
      echo "_________________________________"
       ls $path
    
      fi
   ;; 

# umount Device
6)  clear
    echo "Disk Detail"
    df
   echo "Enter the Umount Device Name()"
    read ud
    sudo umount $ud
   echo "_________________________________"
      df
   echo "Susccesful Umount " $ud
;;
7) exit
;; 
0)   clear
    echo "_________________________________"
        echo "Thank you!!!"
        echo "You are exit from Program"
    echo "_________________________________"
;;
*)   clear
     echo "_________________________________"
     echo "Wrong choice!!!"
    echo "_________________________________"
;;
esac
done

File Handling in Shell

# pro: file handling
# Name: Kishor Sonawane
#
#
ch=1
while [ $ch -ne 0 ]
do