Answered step by step
Verified Expert Solution
Link Copied!

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 1 Vi (10 Marks)
1. What are the 3 modes of vi? Explain the role of the modes.
2. How can you exit vi and save the file at the same time?
3. How can you save a file without exiting vi?
4. How can you turn on line numbering in vi?
5. How is copy and paste and cut and paste performed in vi?
Part 2 Shell scripting (20 marks)
1. File Management Script: Write a shell script called file_management.sh
that performs the following tasks:
Creates a new directory named my_files in the current directory.
Copies all files with a .txt extension from the current directory to the
my_files directory.
Displays a message indicating the total number of files copied.
2. System Information Script: Write a shell script called system_info.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)
3. 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, bzip2, or zip, compress the contents of the destination
directory, to a file.
4. Password Generator Script: Write a shell script called
password_generator.sh that generates a random password of a specified
length. The script should take the desired length of the password as a
command-line argument

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions