Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Boot in Centos or any Linux distribution and login in the user not root Type the command history -c Display the current username List the

  1. Boot in Centos or any Linux distribution and login in the user not root
  2. Type the command history -c
  3. Display the current username

  1. List the file in the directory /usr/lib/kbd/keymaps/legacy/i386/dvorak

  1. Display the file type of /usr/lib/kbd/keymaps/legacy/i386/dvorak/dvorak-ca-fr.map.gz

  1. Copy /usr/lib/kbd/keymaps/legacy/i386/dvorak/dvorak-ca-fr.map.gz to your home directory

  1. Rename ~/dvorak-ca-fr.map.gz to map.pdf

  1. Display the file type of map.pdf

  1. Create a directory ~/touched and change to it (complete in 1 line of commands)

  1. Create the files today.txt and yesterday.txt

  1. Change the date on yesterday.txt to yesterdays actual date (ie January 29, 2020 1 PM)

  1. Copy yesterday.txt to copy.yesterday.txt

  1. Create a directory called ~/testbackup and copy all the files from ~/touched into it (use 1 line for all the commands and include a single command to copy all the files)

  1. Use one command to remove the director ~/testbackup and all the files in it.

  1. Create a directory named ~/etcbackup and copy all *.conf files from /etc (including from subdirectories of /etc

  1. Change to the /etc folder

  1. Create a directory named testdir in /etc

  1. Switch users to the root without logging out of the current user

  1. Create a directory named testdir2 in /etc

  1. Switch back to the user account

  1. Clear your screen

  1. Change back to your home directory

  1. Create myfile.txt

  1. Add the following text to myfile.txt (ignoring quotation marks) This is my file. There are many like it, but this one is mine. My file is my best friend. It is my life. I must master it as I must master my life. Without me, my file is useless. Without my file, I am useless.

  1. Create the alias cls to clear your screen then runt eh command

  1. Create a persistent alias named all, which lists all files in a directory in long format, run to confirm.

  1. Reboot

  1. Check to see if both aliases still work

  1. Create the alias .. that changes to the parent directory, run it

..

  1. Create the alias that changes to the parent of the directory, run it

  1. Remove the alias .. and then try running tehm

  1. List the last few (10-12) lines of /var/log/boot.log (you need admin permission)

  1. Redirect the output of the previous command to a text named lastlog.txt then confirm the contents

  1. List out the long contents of your home directory and send the output to dirlist.txt; confirm the contents

  1. List the long contents of the root directory and append the output to dirlist.txt; confirm the contents

  1. In a single command, list the long contents of the /etc directory, append the output to dirlist.txt and have the output display on the screen

  1. Obtain the number characters for the contents of dirlist.txt

  1. Enter a command to repeat the following message to the screen Hello Dave, would you like to play a game?

  1. Redirect the same message to a file named 2001.txt and display the contents to the screen.

  1. List out the long directory listing of /etc to a file named etc.txt but first echo the comment This is the contents of the /etc directory before the listing begins. This means you have to append the directory listing. Display the listing

  1. Create and edit numbers.txt to include 9 lines with the following:

1

9

5

2

4

6

3

8

7

  1. Display the contents of numbers.txt

  1. Display the content of numbers.txt but sorted by numerical value

  1. Pipe the contents of numbers.txt to the sort command

  1. Have the sorted values redirected to a new file named sorted.txt

  1. Display the history of all the commands you have types.

  1. Display the contents of the ~/.bash_history ( if it does not exist, log out and log back in)

  1. Create a Sha1 hash for .bash_history

  1. Create an MD5 hash of .bash_history

  1. Submit these two values in Blackboard under Week 3 assignment

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