-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnetminDisk
70 lines (63 loc) · 1.17 KB
/
netminDisk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
clear
tput cup 10 20
echo '-----------------------------------'
tput cup 11 20
echo '| 1. View Disk Usage |'
tput cup 12 20
echo '| 2. Create Partition |'
tput cup 13 20
echo '| 3. Delete Partition |'
tput cup 14 20
echo '| 4. Mount Partition |'
tput cup 15 20
echo '| 5. Unmount Partition |'
tput cup 16 20
echo '| 6. Main Menu |'
tput cup 17 20
echo '-----------------------------------'
tput cup 18 20
echo -n 'Enter Choice : '
read opt
case $opt in
1) clear
tput cup 10 0
df -l
read ;;
2) clear
echo -n "Drive Name : "
read drive
fdisk $drive
read ;;
3) clear
echo -n "Drice Name : "
read drive
fdisk $drive
read;;
4) clear
tput cup 10 20
echo -n "Device name to mount : "
read device
tput cup 11 20
echo -n "Directory to mount on : "
read dir
mount $device $dir
read;;
5) clear
tput cup 10 20
echo -n "Directory to unmount : "
read dir
tput cup 11 20
umount dir
read;;
6) clear
tput cup 10 20
echo "Press Enter to return to main menu..."
read;;
*) clear
tput cup 10 20
echo "Invalid Choice!"
tput cup 12 20
echo "Press Enter to return to main menu..."
read ;;
esac