[Solved]Create Home Itadmin Midterm Directory Change Create File Called Midterm Commandssh Put Fol Q37284671
create the /home/itadmin/midterm directory and change intoit
create a file called midterm-commands.sh and put the followingcommands into it:
ls -la
ps
Save and close the file
Make the script executable with chmod
Execute the script and direct the output to your logfile
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
Close your current shell and open a new shell
Set the PATH in your .profile file to include the midtermdirectory
do the env command and output to the logfile
cd to /root and execute the script again from there, output tothe logfile
change the prompt for itadmin to end with the text“ADMINISTRATOR”
source the file to make the prompt change now
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
output the entire contents of the file you had to modify to makethe prompt change to the logfile
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
shut down eth0 and use ifconfig to output to the logfile to showeth0 down
bring back up eth0 and use ifconfig to output to the logfile toshow eth0 back up
go to the midterm dir and do “ps -elf” directing output to a newfile called ps-output1
do it again and this time use the filename ps-output2
using chmod with octal arguments (###) change the permissions toread-write-execute for user, read-execute for group and other onall files in the directory with a single command
do ls -la and redirect to the (original) logfile -LAB-linuxsrv.log
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
use chmod with character arguments to put the permissions to theequivalent of 644 on all files in the dir.
do ls -la and redirect output to the (original) logfile
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
open a browser, go to YouTube, find a long video and beginplaying it, minimize the browser
use the ps command piped to grep to find the process for thebrowser
use the kill command to kill the browser process that you justfound
use chown to reassign all files in midterm to root ownership
use rm to remove the midterm dir and all files (be careful ifyou moved your logfile to there, take it out first!)
do a man on tcpdump and pipe that to grep to find some EXAMPLESof using tcpdump, redirecting the output to the logfile (Hint:do a man on grep first to find out how to print “context” aroundthe found text)
Put a timestamp in your logfile with: date >>LAB-linuxsrv.log
When you are done with all the exercises, upload the two logfiles and your Linux .bash_history files for both itadmin androot
The 4 files you submit are:
MT-winsrv.log
MT-linuxsrv.log
/root/.bash_history
/home/itadmin/.bash_history
Expert Answer
Answer to create the /home/itadmin/midterm directory and change into it create a file called midterm-commands.sh and put the follo… . . .
OR

