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
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 now
This is a popular solution!
Step by step
Solved 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