Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Extend the shell implementation in xv 6 ( sh . c ) so that all commands entered by the user are logged to a file

Extend the shell implementation in xv6(sh.c) so that all commands entered by the user are
logged to a file called sh_history.
The commands should be logged into the file before they are executed.
If sh_history does not exist, your program is responsible for creating it.
When extending shell implementation, you can only add new statements. You should not
modify the existing shell functionality.
When xv6 is re-booted, the previous command history can be either kept or cleared.
Write a program called history.c. This program will read from sh_history and display the history
of the commands.
Sample run:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions