Question

4. (15%) Show the commands you would use change the current working directory from student’s home...

4. (15%) Show the commands you would use change the current working directory from student’s home directory: /home/student to the student’s apache web directory:/var/www/student using:

a. (5%) A series of relative commands

b. (5%) A single relative command

c. (5%) A single absolute command

5. (20%) Suppose you are presently in the /home/student folder and you wish to copy a file (file3.jpg) from the /home/seed/pics directory to your current directory. Provide two sets of copy commands to accomplish your goal: one using absolute paths only and one using relative paths only. (Show the two commands only)

Using Linux

0 0
Add a comment Improve this question Transcribed image text
Answer #1

4. Show the commands you would use change the current working directory from student’s home directory: /home/student to the student’s apache web directory:/var/www/student using:

a.  A series of relative commands:

Solution :

1. Switch to Root Directory:  

 cd ~

2. Go to /var/www/ :

  cd var/www/

b. A single relative command

Solution :

  cd ../../var/www/

c. A single absolute command

Solution :

  cd /var/www/

d. Suppose you are presently in the /home/student folder and you wish to copy a file (file3.jpg) from the /home/seed/pics directory to your current directory. Provide two sets of copy commands to accomplish your goal: one using absolute paths only and one using relative paths only.

Solution :

  • Using Absolute path :
     cp /home/seed/pics/file3.jpg  /home/student/
  • Using Relative Path :

      cp  ../seed/pics/file3.jpg .
Add a comment
Know the answer?
Add Answer to:
4. (15%) Show the commands you would use change the current working directory from student’s home...
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
  • Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume...

    Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume you are started at your home directory. Perform a command that displays the absolute path of your home directory (your current location). Create a new directory inside your home directory and name it “Assignment-3” Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and...

  • 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...

  • Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS...

    Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS that you set up from Question 1. Assume you are started at your home directory. a) Perform a command that displays the absolute path of your home directory (your current location). b) Create a new directory inside your home directory and name it “Assignment-Two” c) Without moving into the directory you just made (staying in your home directory), create three new directories using one...

  • 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...

  • In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and...

    In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and you have two files nomed datol and dotaz in your current directory. What command can you use to copy the data and dotaz files from your current working directory to the datafiles directory? TTT Artal 3120 T.... 5 BE36 Pantep Words: 0

  • 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...

  • Unix/Linux The purpose of this lab is to practice the commands to manage and organize files...

    Unix/Linux The purpose of this lab is to practice the commands to manage and organize files and directories: How would one go about this? Thanks. Task 1: Preliminaries: 1) If you have not already done so, create a directory called bin under your HOME directory. 2) If you have not already made a copy (using ftp) of the file called famous.dat from the Assignment#1, do that now. 3) Make bin the active/working directory. Task 2: Perform all of the following...

  • 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 D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • 1) Copy bother10.sh from /home/ghoffman/course_files/it244_files to your hw6 directory. Run this program in the background redirecting...

    1) Copy bother10.sh from /home/ghoffman/course_files/it244_files to your hw6 directory. Run this program in the background redirecting output to /dev/null. Be sure you copy and run bother10.sh, NOT bother.sh. 2) Run a command that shows the job number of the process running bother10.sh. 3) Run a command that shows the process ID of the process running bother10.sh. 4) Copy the script make_foo.sh from ~ghoffman/course_files/it244_files to your current directory. Run this script. Using touch, create the file foo.txt. Perform a long listing...

  • Could you help me do the commands from nmber 16 to 21 For this assignment, you...

    Could you help me do the commands from nmber 16 to 21 For this assignment, you will: Unpack a tar archive. Change the unpacked files. Repack the files into a new tar archive. Turn in your new tar archive. Details Do not use an editor unless it specifically states to edit the file. By "editor" I mean vim, gedit, pico, etc. Despite its name, we don't consider sed to be an editor in this assignment, so you may use it...

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