
Unix Commands
Using the Unix commands, you have learned in class, create the following file structure:
• Create a directory called "unix_hw" in your home directory.
• Within "unix_hw", create a file called "helloworld.c" and a directory called "output".
• Compile your helloworld.c file into output folder. This should create an output executable file in output folder.
• Run the helloworld
• Within "output", create a file called "notes.txt". • Move "notes.txt" to "unix_hw" (using relative path)
• Remove "notes.txt" from output folder. (using absolute path)
• Remove "output" (using absolute path) Perform above steps on your Unix account, then copy each command your ran into a text file and take a screenshot of your terminal window such that all steps are visible.

Introduction
Unix commands are a set of instructions that can be executed on a Unix-based operating system. Unix commands provide a way to interact with the operating system and perform tasks such as navigating the file system, creating and editing files, running programs, managing processes, and configuring system settings.
Unix commands are typically entered into a command-line interface, also known as a shell, using a text-based interface. Some of the most commonly used Unix commands include cd (change directory), ls (list files and directories), mkdir (make directory), rm (remove file or directory), cp (copy file or directory), mv (move or rename file or directory), cat (display contents of a file), grep (search for text within files), chmod (change file permissions), and sudo (execute command as a superuser).
Unix commands can be powerful and efficient tools for managing and controlling a Unix-based system, but they can also be complex and potentially dangerous if used improperly. It is important to have a solid understanding of how Unix commands work and to use them with caution and care.
Here are the Unix commands to perform the tasks:
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 9 images

i got this error when i run could you help me please thank you
/unix_hw/output/unix_hw$ gcc helloworld.c -o output/helloworld
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
i got this error when i run could you help me please thank you
/unix_hw/output/unix_hw$ gcc helloworld.c -o output/helloworld
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
- If wrong answer this time will downvote it Create a class with a static main that tests the ability to resolve and print a Path: • Create an instance of a FileSystem class. • Resolve an instance of a Path interface from a directory path and filename. • Print the constructed Path with System.out.println() method. 2. Create a class with a static main that tests the ability to resolve and print a Path: • Create an array of Path class. • Instantiate instances of Path with absolute and relative paths. • Print the constructed elements of the array of Path class with System.out.println() method. 3. Create a class to test serialisation class that implements serializable, it should implement the following: • A static void method that serialises an object. • A static void method that deserializes an object. • A static main method that tests the two by moving an object from one to the otherarrow_forwardWrite the program FileComparison that compares two files. Two files have been provided for you, Quote.txt and Quote.docx, both containing movie quotes and are located in the /root/sandbox/ directory Note: you will not be able to see the Quote.docx file. Next write the file comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file’s size, you can create a System.IO.FileInfo object using statements such as the following, where FILE_NAME is a string that contains the name of the file, and size has been declared as an integer: FileInfo fileInfo = new FileInfo(FILE_NAME); size = fileInfo.Length; Your program's output should look like the following: The size of the Word file is FILE_SIZE and the size of the Notepad file is FILE_SIZE The Notepad file is x% of the size of the Word file using System; using static System.Console; using System.IO; class FileComparison { static void Main() { // Getting…arrow_forwardWrite a program (in Java or C++), allowing to: • Create a folder "Main" • Create a file in the folder "File1" Add Read, Write permissions to "File1" Write in "File1" ● ● Read the content of "File1" ● Modify the content of "File1" Remove the Write permission of "File1" Try to write again in "File1" ● A screenshot is needed showing the results of the program execution.arrow_forward
- in c# i need to Write the program named DirectoryInformation that allows a user to continually enter directory names until the user types end. If the directory name exists, display a list of the files in it; otherwise, display the following message, Directory foo does not exist, to indicate the directory does not exist (foo would be the name of the directory to be checked) . Create as many test directories and files as necessary to test your program. An example of the program is shown below: Enter a directory >> lorem lorem contains the following files lorem/ipsum.txt Enter another directory or type end to quit >> foo Directory foo does not existarrow_forwardA file was created under the /home/newsletters/ folder named today.log. Assume that we have a File object named testFile pointed to the file. Which segment of code will output: /home/newsletters/today.log O O O System.out.println(testFile.getPath()); System.out.println(testFile.getName()); System.out.println(testFile); 1 19°F Partly cloudy Q Searcharrow_forwardpythhon 3arrow_forward
- A student wants to write into a file called myfile, without deleting its existing content. Which one of the following functions should he or she use? f = open('myfile', 'r') f = open('myfile', 'w+b') f = open('myfile', '+') f = open('myfile', 'a')arrow_forwardCreate a new Python file in this folder called task3.py. • Design a program that determines the award a person competing in a triathlon will receive. • Your program should read in the times in minutes for all three events of a triathlon, namely swimming, cycling and running and then calculate and display the total time taken to complete the triathlon. The award a participant receives is based on the total time taken to complete the triathlon. The qualifying time for awards is 100 minutes. Display the award the participant will receive based on the following criteria: Total time Within qualifying time. Within 5 minutes of qualifying time. Within 10 minutes of qualifying time. More than 10 minutes of qualifying time. Award Provincial Colours Provincial Half Colours Provincial Scroll No awardarrow_forwardThis is a main module. w7_main Module (supplied) Do not modify this module! Look at the code and make sure you understand it. // Workshop 7 // Version: 1.0 // Author: Asam Gulaid // Description: // This file tests your workshop 7 ///////////////////////////////////////////// #include<iostream> #include "Minister.h" #include "Minister.h" // intentional #include "MemberParliament.h" #include "MemberParliament.h" // intentional using namespace std; using namespace sdds; void printHeader(const char* title) { char oldFill = cout.fill('-'); cout.width(62); cout << "" << endl; cout << "|> " << title << endl; cout.fill('-'); cout.width(62); cout << "" << endl; cout.fill(oldFill); } void newElections(Minister& aMinister, const char* district, const char* newPM, double year) { aMinister.NewDistrict(district); aMinister.changePM(newPM); aMinister.assumeOffice(year); cout << "Status of New Election " << aMinister << endl…arrow_forward
- Python question: I have a .py file in another folder in the same directory how do I import that file into another .py file? For example, my directory folder is called "School_Work" I have 2 folders: Helper_Functions Main_Driver In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?arrow_forwardYou are implementing a simple file system for an operating system for managing files and folders; similar to Windows or UNIX. Your design should follow the following guidelines i) The entire file system is represented by an object which is the reference to the root folder ii) Any folder in the file system may contain two types of items, folders (subfolder) and files and you want to treat both in the same way iii) possible operations: getName, getPermission, listItem What is the most appropriate design pattern?arrow_forwardCreate a folder named lastnameCh6Sum where the last name is your last name. Example: summersCh6Sum Inside your new folder place a copy of the attached numbers.txt file I have attached below. Write the following python program and save it in your new folder This program must open up the numbers.txt file, read all the numbers in the file, calculate their total, output the sum to a new file named sum.txt as well as display the sum to the screen. Make sure to display a message to the user before you print the sum to the screen that lets the user know that the sum has been calculated and saved in the sum.txt file. Also display the total on the screen.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





