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 program from output folder. • 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 abo

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2E: Create a program named FileComparison that compares two files. First, use a text editor such as...
icon
Related questions
Question

 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 program from output folder.

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

Expert Solution
Step 1

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 now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 9 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT