Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Outcome: Unix and your first program 1) The command 1s -1 produces an output. Fo

ID: 3588583 • Letter: O

Question

Outcome: Unix and your first program 1) The command 1s -1 produces an output. For example: -rw-r--r--1 cg cg 82 Jan 25 09:17 main.c Explain what each part of the output in the line means? 2) Briefly explain the use of the chmod command and how it can be used. Create a directory in your home directory called myDi; that allows only you to read, write, and execute. No permissions are given to anyone else. 3) Briefly discuss both how and why you would redirect standard input at a UNIX command prompt. 4) Every UNIX and Linux system contains full documentation of UNIX commands. Where is this documentation found? What is the syntax used in order to retrieve the information in the manual and display it as text output on your screen? 5) Briefly explain the importance of directories in a UNIX system and how to create them 6) While executing your .c program, your program has faced an infinite loop and is "frozen". How would you force the program to stop without closing the terminal? Write two different ways to terminate the program

Explanation / Answer

1. -rw-r--r--

Generally in Unix there are three types of users are there

1. Owner permissions

2Group permissions

3. Other (world) permissions

rw- these are the permission for Owner

Owner has read and write permissions

r-- for group

group members have only read permissions

r-- for others

others have read permissions

2

To create directory we use mkdir

mkdir Mydir

3.

The input of a command is redirected from a file. As the greater-than character, > is used for output redirection, the less-than character < is used to redirect the input of a command.

ex:

cat test.txt

Using less

If you have to view the contents of a longer file, you can use a pager such as less.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote