What is the equivalent of the root directory

Assignment Help Operating System
Reference no: EM131010982

Part -1:

In your opinion, what folder serves as the "starting point" for the directory structure in Windows? What is the equivalent of "The Root Directory (the slash /)"? (There are several good candidates.) Remember to cite your sources as it is important to support your opinion with referenced material(s).

Part -2:

1. Boot your Ubuntu system and open a command shell.

2. Execute the command pwd: where are you?

Is this an absolute or a relative pathname? How can you tell?

3. Use the mkdir command to create a directory named CourseNotes and another named DirTest.

4. Use the cd command to enter the directory named DirTest. Use the vi editor to create a new file named problem.txt. In this file enter five lines of text describing your current course schedule. Relative to your current location, what is the name of this file?

Use the pwd command - what IS your current location?

Construct the absolute pathname of the file:

5. Use the cd command to return to the parent directory (your home directory). Write the command you used. Can you think of an alternative to that command?

6. Use the rmdir command to eliminate the DirTest directory (NOTE: This command should not work.) Now use the rm command with the -r option on the DirTest directory. Why does this one work?

7. Use the vi editor to create a file named lecture05.txt and type descriptions of the commands we are discussing - pwd, mkdir, rmdir, rm, cd, cp, and mv.

8. Use the cp command to make copies of the lecture05.txt file, leaving most of the filename intact but replacing the number with 06, 07, 16, and 25.

9. Review the wildcard characters discussed in class. Which files are moved by the commands described in a through e?

NOTE: The following command sequence will reset your files to their original state, assuming that you start with your home directory as your current working directory:

cd CourseNotes
mv lec* ..
cd

a. mv lec* CourseNotes
b. mv lec*.txt CourseNotes
c. mv lec?.txt CourseNotes
d. mv lecture0?.txt CourseNotes
e. mv lecture??.txt CourseNotes

10. Now imagine that you have another file named lecithin.txt in your home directory. Which of the commands in instruction #9 would move all of your lecture notes to the CourseNotes directory while leaving the lecithin.txt file behind?

(Notice how sometimes the question mark is more useful than the asterisk.)

11. After completing Worksheet #2, you should have several files with a basename of sample in your home directory. Imagine you had just logged into your system and opened a command shell. Further, imagine that you have been working on this system for a long time, and have collected a large number of files in your home directory. You wish to organize the work you have done by creating directories and moving your work into the appropriate places. Write the sequence of commands you would use to create a new directory named VISamples and move the text files you created last time (while practicing vi) into that directory.

12. Now imagine that you have logged onto a Windows XP system. Provide instructions which would permit you to perform the same set of actions described in instruction #11. You may assume that the files with the basename of sample already exist in your My Documents directory. Make sure you enumerate every click of the mouse and everything you type at the keyboard.

The purpose of this lab is to practice commands which provide information about files.

NOTE: These instructions reflect the user interface in version 12.04LTS of Ubuntu.

Part -3:

1. Boot your system and open a command shell.

2. After completing part#2, you should have a number of files with a base name of lecture in the CourseNotes directory, and a number of others with a base name of sample in the VISamples directory. Check to make sure those files are there. If they are not, use vi to create some files with those names in the appropriate directories.

3. Read the manual page on the find command. Notice that the directory which will serve as the starting point for your search is the first parameter given to that command. That starting point is followed by an expression which describes the files in which the user is interested. Begin by searching for files that have a name containing a string. (NOTE: This replicates the function of the Microsoft Windows Find Files operation). What expression element specifies that you are searching on filename?

The following command will search for all of the files whose name contains the string "open" within the user's home directory:
find ~ -name *open*

Note the use of the asterisks. The find command will match the string exactly, so the asterisks tell it to ignore anything that preceeds or follows the string "open".

Look back at the manual page on the find command. What expression element allows you to specify the modification time?

Pay close attention to the use of + and - signs in that specification. What expression would describe files modified more recently than six days ago?

4. Using what you have learned, write commands which will perform the following searches. Test them at your command prompt.

a. Search for filenames containing the string "sample" starting at your home directory.

b. Search for those same filenames starting at the VISamples directory.

c. Search for those same filenames starting at the CourseNotes directory.

d. Search for all files modified within the last six days, starting at your home directory.

5. Use the grep command to search all of the files in the VISamples directory for the string "easy". Perform your search using the capitalization and spacing you used when typing the file, then search again with a mismatch. Notice that the grep command is case sensitive.

6. Use the wc command to measure the contents of your lecture05.txt file (in the CourseNotes directory). How many lines and words are in the file?

7. Use the file command on CourseNotes and on CourseNotes/lecture05.txt. What do you get?

8. Copy the lecture05.txt file to two new locations: a lecture05a.txt and a lecture05b.txt. Move to the 'b' file and make two small changes on two different lines.

9. Use the diff command to identify the differences between lecture05a.txt and lecture05b.txt. Can you describe what the following characters mean, when they appear in the output of diff?

Reference no: EM131010982

Questions Cloud

Financial analysts forecast limited brands growth : Financial analysts forecast Limited Brands (LTD) growth for the future to be 10.6 percent. LTD’s most recent dividend was $0.80. What is the fair present value of Limited Brands’s stock if the required rate of return is 14.9 percent?
Handle an ethical conflict : What steps should a management accountant take if established written policies provide insufficient guidance on how to handle an ethical conflict?
How does patient safety relate to evidence based practices : Choose one of the national patient safety initiatives identified by The Joint Commission or AHRQ. How does patient safety relate to evidence based practices
Create a data flow diagram of the current system : a. Create a data flow diagram of the current system. b. Create a system flowchart of the existing system. c. Analyze the internal control weaknesses in the system. Model your response according to the six categories of physical control activities ..
What is the equivalent of the root directory : Write the command you used. Can you think of an alternative to that command - Use the vi editor to create a file named lecture05.txt and type descriptions of the commands we are discussing - pwd, mkdir, rmdir, rm, cd, cp, and mv.
Policies provide insufficient guidance : What steps should a management accountant take if established written policies provide insufficient guidance on how to handle an ethical conflict?
Future value of multiple annuities : Future Value of Multiple Annuities Assume that you contribute $110 per month to a retirement plan for 20 years. Then you are able to increase the contribution to $210 per month for another 20 years. Given a 6.5 percent interest rate, what is the valu..
What is the effective interest rate after the second year : Teaser Rate Mortgage A mortgage broker is offering a 30-year mortgage with a teaser rate. In the first two years of the mortgage, the borrower makes monthly payments on only a 6.8 percent APR interest rate. After the second year, the mortgage interes..
What is annualized holding period return : John purchased 100 shares of Black Forest Inc. stock at a price of $153.96 three months ago. He sold all stocks today for $157.67. During this period the stock paid dividends of $5.04 per share. What is John’s annualized holding period return (annual..

Reviews

Write a Review

Operating System Questions & Answers

  Creating hipo charts and decision tables

Now that you have a program design and a selected programming language for your assignment, you can start looking at the logical flow of the processes within your program and the data that is input,

  What is average rotational latency if seek time is given

5 Disk, seek time, latency, sector, request Single-platter disk rotation speed: 7200 rpm number of tracks on one side of platter. What is avg rotational latency?

  Explian wired and wireless media

Discuss and explian wired and wireless media along with the drawbacks and benefits of each also Discuss the channel signaling systems used in voice communication along with the drawbacks and benefits of each.

  Relocation hardware costs money

Since relocation hardware costs money, why support relocation? Give at least two reasons? 2) Make arguments for smaller page size on a paging system?

  What are the bits that support the demand paging

What are data structures that are used for Demand Paging? What are the bits that support the demand paging?

  Race condition

Race Condition:  A situation in which multiple threads or processes read and write a shared data item and the final result depends on the relative timing of their execution.

  Show the output of the screen when the program executes

Show the output of the screen when the program executes with a value of 200.

  Ext4 file systems on linux vs. ntfs file systems

List what characters are absolutely not allowed for ext4 file systems on Linux vs. NTFS file systems on Windows in a plain text document.

  Describe different ways to program producer-consumer problem

Describe two different ways to program producer-consumer problems using shared buffers and semaphores in Windows 7. Think about how to implement the shared buff- er in each case.

  Value of semaphore before entering into critical section

Give a solution using Monitor that is starvation-free. What would be value of semaphore before entering into Critical Section and after leaving it.

  Provide the design and justification for your mechanism

Provide the design and justification for your mechanism that supports process dispatching and is operating system reliability and protection enhanced with the microkernel approach to system design?

  Question about computer memory cells

Discuss how many cells can be in a computer's main memory if each cell's address can be represented by two hexadecimal digits?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd