21.6k views
4 votes
Restore into your restored directory only your whoami file and display its contents. Insert a screenshot showing the commands you just issued, as well as their output.

a) cp whoami /restored_directory
b) mv whoami /restored_directory
c) restore /restored_directory whoami
d) cat /restored_directory/whoami

User Sableraph
by
8.2k points

1 Answer

4 votes

Final answer:

The question pertains to the restoration of the file 'whoami' into a directory and then displaying its contents using Unix-based command-line instructions. The correct commands include 'cp' or 'mv' for restoration and 'cat' to display its contents.

Step-by-step explanation:

The subject of this question deals with file operations on a computer system, which falls under the category of Computers and Technology. Specifically, the student is requested to restore a file named whoami into a directory named restored_directory and then display its contents. To accomplish this, one would typically use command-line instructions in a Unix-based operating system.

To restore the whoami file, you could use the cp (copy) command if you want to keep the file in the original location as well, or the mv (move) command if you want to move it without leaving a copy behind. After restoring the file, you can check its contents using the cat (concatenate and display) command:

  1. cp whoami /restored_directory or mv whoami /restored_directory to copy or move the file respectively.
  2. cat /restored_directory/whoami to display the content of the whoami file that was just restored to the /restored_directory.

User Adam Milward
by
8.9k points