For this project what does the x do in vi Linux?
Added by Colleen N.
Step 1
Step 1: Open the terminal in your Linux environment. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 71 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Question 2: Manipulate directory structures in Unix/Linux (24 marks – 2 marks each) Use any OS that you set up from Question 1 (Puppy is allowed). Assume you are started at your home directory. Let your first name be XXX, so XXX = ‐‐Mark", if your name is Mark. XXX from now on refers to your first name (e.g. Mark). Perform a command that displays the absolute path of your home directory (your current location). 1. Create a new directory inside your home directory and name it ‐‐XXX" 2. Now navigate to the XXX directory and create directory XXX-COMP501WORK and change your current working directory to XXX-COMP501WORK. 3. Create three new subdirectories called Sec1, Sec2, and Sec3 in XXX-COMP501WORK directory. 4. Create a new file called ‐‐MyFave.txt" using the touch command and insert three lines into the file (you may use echo command and >> command). a. The first line should contain your name and ID number. b. The second line should be the first sentence of your favourite song. c. The third line should be the name of your favourite movie. And display the contents of the file ‐‐MyFave.txt" to the standard output screen (you may use cat command). 5. Display the number of words in the file ‐‐MyFave.txt" (you may use wc command). 6. Copy the file ‐‐MyFave.txt" to directory ‐‐Sec1" and rename it to ‐‐MyFaveCopy.txt". Make another copy of ‐‐MyFaveCopy.txt" just made in directory ‐‐Sec1" and name it ‐‐MyFaveCopyCopy.txt" (also store in the same directory ‐‐Sec1"). Then, display the contents of the directory ‐‐Sec1" using the long format. 7. Copy all the contents of directory ‐‐Sec1" to directory ‐‐Sec2" and display the contents of the directory ‐‐Sec2". 8. Assume that you are now at the current working directory XXX-COMP501WORK; create 15 new files (in directory XXX-COMP501WORK) named as follows: a. FICT.bak b. unix.txt c. thistest.bak d. wumbo.file e. wumbology.txt f. moreThings.woot g. FundalT.txt h. doodad.text i. coursetxt j. Test‐1‐2.xtxt k. Test‐2‐2.xtxt l. Test‐1‐1.bak m. Test‐1.txt n. File‐1.bat o. Assignment1.file And display a listing of all the files and directories in long format in the current working directory XXX-COMP501WORK. 9. Display a listing of all the files in the current working directory ending with letter 't' using one command, e.g. unix.txt or doodad.text. 10. Display a listing of all the files in the current working directory starting with 'T' and ending with 't' using one command, e.g. Test-1.txt.
Akash M.
Find the value of x x = √[ ? ]
James K.
2. What is the command line to open a file named xyz with cursor on the line with first occurrence of word UNIX? 3. What is view? 4. What are the numbered buffers? 5. What are the named buffers? 6. What is the vi command to a. delete a line? b. delete a word? c. copy a line? d. copy a word? e. delete to the end of the current line?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD