Question

2. Answer the correct command instructions to complete the following: a. What is the admin account (username) you created in
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question a) Unix/Linux admin account user name is root

   and it's home directory is /home

Question b) Assumed home directory is /home/HomeworkLibuser

$pwd

/home/HomeworkLibuser

$mkdir    Dir1.0

$mkdir    Dir2.0

The above two commands creates two directories

with the names Dir1.0 and Dir2.0 under HomeworkLibuser

home directory i.e /home/HomeworkLibuser

Now to create a subdirectory Dir1.1 under Dir1.0

First we need to change Dir1.0

For this we have to use cd command and its argument as Dir1.0

$cd   Dir1.0

$pwd

/home/HomeworkLibuser/Dir1.0

pwd is a command to know the present or current working directory. now we are under Dir1.0

Here we need to create Dir1.1.

For this we have to use mkdir command with a subdirectory name as Dir1.1

$mkdir     Dir1.1

Now we need to create Dir2.1 subdirectory under Dir2.0

But, we are in Dir1.0 directory

So, First we need to goback to the home directory

i.e /home/HomeworkLibuser

For this we need use cd command with two consecutive dots as arugment ( .. -- means parent directory )

$cd ..

$pwd

/home/HomeworkLibuser

Now change to Dir2.0 using again cd command with arguments as Dir2.0

$cd    Dir2.0

$pwd

/home/HomeworkLibuser/Dir2.0

Now we are under Dir2.0.

mkdir and its argument as Dir2.1, creates a Dir2.1 subdirectory.

$mkdir   Dir2.1

cd ..

$pwd

/home/HomeworkLibuser

Question C)

$pwd

/home/HomeworkLibuser

$cd    Dir1.0

$pwd

/home/HomeworkLibuser/Dir1.0

$   >     file1 # this command simply creates a zero byte file

$ls

Dir1.1     file1

C.1)Change to Dir1.0 and move file1 to Dir2.1 with new name file4.

$mv   file1      ../Dir2.0/Dir2.1/file4

$cat   file1

cat: file1: No such file or directory

$

Means, file1 was moved to

..                  -- parent directory   i.e /home/HomeworkLibuser

../Dir2.0           -- i.e /home/HomeworkLibuser/Dir2.0

../Dir2.0/dir2.1   -- i.e /home/HomeworkLibuser/Dir2.0/Dir2.1

file4                  --    is the new name of the oldfile file1 which is from /home/HomeworkLibuser/Dir1.0

C.2) In your home directory and copy file4 to Dir2.0 with a new name file3

$cd ~ # ~ (tild symbol) directly takes to the users home directory

$pwd

/home/HomeworkLibuser

$

$cp   Dir2.0/Dir2.1/file4      Dir2.0/file3

$

C.3) concatenate file3 and file4 to a new file named CatFile and save to home directory

$pwd

/home/HomeworkLibuser

$cat Dir2.0/file3    Dir2.0/Dir2.1/file4    >     /home/HomeworkLibuser/CatFile

$cat CatFile

$

Nothing will be displayed because,intially we create a zero byte file

C.4) Change to home directory with sing command ( from anywhere )

~ ( tlid symbol).

It is a metacharacter, it represents home directory.

$cd ~

$pwd

/home/HomeworkLibuser

$

   

Add a comment
Know the answer?
Add Answer to:
2. Answer the correct command instructions to complete the following: a. What is the admin account...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • You are working with the file directory of a Windows XP computer from the command line,...

    You are working with the file directory of a Windows XP computer from the command line, and you use the md command to create a new directory in your My Documents directory. What command switch can you issue to confirm that the new directory was created? A. Just use the dir command to view all of the directories and files in the My Documents and look for the name of directory you just created B. dir /new C. dir /bn...

  • 3. As a system admin, on your Ubuntu server, you are asked to complete these tasks:...

    3. As a system admin, on your Ubuntu server, you are asked to complete these tasks: • Create these directories: documents, data, bin so that every user added will automatically have these directories in their home directory • Add a new user with username as jdoe and full name jane doe, and create the home directory for the user at the same time • Assign a password jdoe1234! to that user • Set the password to expire after 60 days...

  • give notes to what each look like and description in text form Lab#1 –Learning Some Basics...

    give notes to what each look like and description in text form Lab#1 –Learning Some Basics applied Skills We have completed our initial install of Ubuntu and begun to feel our way around our new system. The following assignment will help you familiarize yourself with your new environment. Please use your system to test answer the following questions. After you have logged in and opened a term window... SECTION I: Simple Navigation of the file system 1. Use df command...

  • Write a bash shell script to carry out each of the following tasks: What to Do:...

    Write a bash shell script to carry out each of the following tasks: What to Do: a. Safe Delete: When you use the “rm” command in Linux, it will delete the specified files, with no chance for recovering them back later. Write a script (called srm) that will safely delete the files passed to it as command-line arguments. For example, typing the command: “srm file1 file2 file3”, the script shall not actually delete these files, but instead it shall move...

  • Open Command Prompt typing CMD command in your Search window. Change the directory from current to...

    Open Command Prompt typing CMD command in your Search window. Change the directory from current to root (C:). Make a new directory called CIS165_Your Last Name (example: CIS165_Nossa). Within this directory, make subdirectories called Can1 and Can2. Verify the created directory and subdirectories using particular command. Under Can1 subdirectory creates three files called Jam.txt, Milk.txt and Juice.txt. Verify that you created these files using particular command. Move Jam.txt file from the Can1 subdirectory to the Can2 folder. Compare using special...

  • Please help with this linux lab. Please include screenshots as I keep getting errors when I...

    Please help with this linux lab. Please include screenshots as I keep getting errors when I attempt this lab. Thank you in advance Example 1 Enter the system root directory cd / pwd [this command prints working directory] Here is how to go back to your home directory: cd ~ pwd Example 2 Use the Change directory command cd /labs/lab1/ohio inside the ohio folder use the Touch command to create a file called ohiostate.txt /labs/lab1/ohio/touch ohiostate.txt Use the pwd and...

  • Login to Suse Linux as root. Complete the task working as the root user. 1. What...

    Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...

  • Select your answer from here. absolute pathname to the file called xyz changes the directory to...

    Select your answer from here. absolute pathname to the file called xyz changes the directory to the parent of the current directory. lists current directory files including the invisible files sends xyz file to the line printer deletes the directory called xyz displays the content of the file called xyz displays the current directory pathname cancels the printing job on the 1p 1 printer confirms the deletion of the xyz file before deleting it lists the current directory in long...

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory. Select the correct find command string below that will accomplish this. find /etc -name 'resolv.conf-cat f} \; find /etc -name 'resolv.conf' -exec cat {} \; find . -name 'resolv.conf' -exec cat {} \; O find / -name 'resolv.conf' -exec...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT