basicunixia

docx

School

Ohio University, Main Campus *

*We aren’t endorsed by this school

Course

101

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

4

Uploaded by SuperOtter3831

Report
Basic UNIX Commands Independent Assignment Name: _________________________ Unity ID: _________________________ Practice with Basic UNIX Commands in Terminal For this section, you will need to log into your terminal and execute the correct answers AND write what you wrote in the terminal window in the space provided below each question 1 . Unless otherwise specifically stated, you are allowed to use relative pathnames. Your answers should be highlighted in yellow . 1. Log into your terminal window. Begin a log file named basicunixia.txt . You must use one of the options associated with this command that will log your actions in real time. You should NOT exit until prompted to do so later in this document. Command Line: script -f basicunixia.txt 2. To remember where your log file was created, which command would display the absolute pathname to your current directory? You should execute that command now and note where you are located in the file system when you executed that command. Command: pwd Output (Location): /afs/unity.ncsu.edu/users/c/ccparke4 3. Create a directory named BasicUNIXIA making sure that it is in your MyE115 directory. Execute this command without changing directories. Command Line: mkdir ~/MyE115/BasicUNIXIA 1 The prompt(eos%, $, etc.) and is never part of the command line as it is not actually something you have written E 115 Spring 2021 Page 1
Basic UNIX Commands Independent Assignment 4. Doing so in one command line, change directories to the E 115 course locker using the absolute pathname and list the contents of that directory. When listing the contents, you should include details such as the size of the file, but we do not want to list all of the files. Command Line: cd /afs/eos.ncsu.edu/lockers/admin/csc/e115 E 115 Spring 2021 Page 2
Basic UNIX Commands Independent Assignment 5. In the common/assignments/basicunix directory of the E 115 course locker there are 2 files named useless.txt and goPack.txt respectively. From your current location, copy these files to your newly created BasicUNIXIA directory in one command line WITHOUT using chaining. You can copy them in two lines, but for only partial credit. Remember… you are already in the E 115 course locker and do not need the absolute pathname. Command Line: cp ./common/assignments/basicunix/useless.txt ./common/assignments/basicunix/goPack.txt ~/MyE115/BasicUNIXIA 6. Navigate back to your ~/MyE115/BasicUNIXIA directory (command 1). From this location, rename the file goPack.txt to something else, making sure that the original no longer exists in your BasicUNIXIA directory (command 2). Command Line (1): cd ~/MyE115/BasicUNIXIA Command Line (2): mv goPack.txt ReplacementPack.txt 7. While still in your BasicUNIXIA directory, remove the file useless.txt that you copied in step 5. Command Line: rm -f useless.txt **EXIT your log file at this time** 8. Now using your file transfer system, copy your finished basicunixia.txt file from your AFS space to your laptop or lab computer. Open the file using a text editor to ensure that it has stuff in it. Command used to close log file: exit E 115 Spring 2021 Page 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Basic UNIX Commands Independent Assignment Submit the file basicunixia.txt and this completed document to the appropriate place in Moodle. Please name this file basicunixia_completed.docx to avoid confusion with the original, unedited file. Make sure you’re submitting to the correct locker!!! Also… please be sure that when you are finished, you click SEND FOR MARKING. If you edit your submission after your section’s deadline, you will earn a 0 for the assignment. E 115 Spring 2021 Page 4