Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1 Vi ( 1 0 Marks ) 1 . What are the 3 modes of vi ? Explain the role of the modes. 2
Part Vi Marks
What are the modes of vi Explain the role of the modes.
How can you exit vi and save the file at the same time?
How can you save a file without exiting vi
How can you turn on line numbering in vi
How is copy and paste and cut and paste performed in vi
Part Shell scripting marks
File Management Script: Write a shell script called filemanagement.sh
that performs the following tasks:
Creates a new directory named myfiles in the current directory.
Copies all files with a txt extension from the current directory to the
myfiles directory.
Displays a message indicating the total number of files copied.
System Information Script: Write a shell script called systeminfo.sh that
gathers and displays the following system information:
Hostname
Kernel version
CPU information number of cores, processor type
Total memory available
Disk usage information total disk space, used space, available space
Backup Script: Write a shell script called backup.sh that creates a backup
of a specified directory. The script should take the following parameters:
Source directory: the directory to be backed up
Destination directory: the directory where the backup will be stored.
The script should create a timestamped directory inside the destination
directory and copy all files and subdirectories from the source directory
into it
Using, gzip, bzip or zip, compress the contents of the destination
directory, to a file.
Password Generator Script: Write a shell script called
passwordgenerator.sh that generates a random password of a specified
length. The script should take the desired length of the password as a
commandline argument
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started