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

Reproduce the process state chart . (10pts) Explain what each of the following c

ID: 3712233 • Letter: R

Question

Reproduce the process state chart . (10pts)





Explain what each of the following commands do, as well as which operating system uses them (1.5 pts each):

ls

Cd

Grep

Dir

Type

Cat

Ps

Mv

Robocopy

Sed

Sudo

chmod










What is an environment variable? What does the PATH environment variable contain? What is PATH used for? (4 pts)







What are the 4 major jobs of a modern operating system? (4 pts)




In memory management, what is the role of a 'dirty bit', and why do we keep track of it? (3 pts)





What is meant by the term 'user mode', and what is meant by the term 'kernel mode'? (4 pts)



What is a working set? (2 pts)





What is the first line of every bash script? (2 pts)



What is the permission string (RWXRWXRWX format) of the number 311 (2 pts)



What is the base directory of a file system called on windows (1pt), and on linux (1 pt).




What does the term 'super user' mean in terms of operating systems (2 pts).






12) EXTRA CREDIT: (3 pts)
You have been hired to test the capacity of Al Harrington's ShatterProof Snibbets to work after they are dropped from large heights. You have been given 2 Snibbets, and access to a 100 story building. You need to determine the maximum floor the Snibbets can be dropped from without shattering. You only have time to test 20 floors. How can you do this? Can you do it in less than 15 test drops?



  




Explanation / Answer

Explain what each of the following commands do, as well as which operating system uses them

Answer:

ls:

The ls command lists the contents of, and optional information about, directories and files. With no options, ls lists the files contained in the current directory, sorting them alphabetically.

Syntax

Cd:

The cd command, also known as chdir (change directory), is a command-line OS shell command used to change the current working directory in operating systems such as Unix

cd - To change directory - change the current working directory to a specific Folder.

SYNOPSIS

Grep:

The grep command is used to search text. It searches the given file for lines containing a match to the given strings or words. It is one of the most usefulcommands on Linux and Unix-like system. Let us see how to use grep on a Linux or Unix like system

grep, which stands for "global regular expression print," processes text line by line and prints any lines which match a specified pattern.

grep syntax

Dir:

dir command is used to list directory contents

SYNOPSIS

dir [OPTION]... [FILE]...

MV:

mv (short for move) is a Unix command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed. Using mv requires the user to have write permission for the directories the file will move between. This is because mv changes the content of both directories (i.e., the source and the target) involved in the move. When using the mv command on files located on the same filesystem, the file's timestamp is not updated.

mv command syntax

$ mv [options] source dest

mv command examples

Move main.c def.h files to /home/usr/rapid/ directory:

$ mv main.c def.h /home/usr/rapid/

Robocopy command:

Robocopy command to transfer files from linux to Windows server.

Type:

type command is used for displaying information about command type. It displays if command is an alias,shell function, shell builtin, disk file, or shell reserved word. You can use type command with other command names also

SYNOPSIS

cat:

cat command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files

cat - Concatenate and print the content of files.

SYNOPSIS

DESCRIPTION

Cat command concatenate FILE(s), or standard input, to standard output. With no FILE, or when FILE is -, it reads standard input.
ps:

The ps (i.e., process status) command is used to provide information about the currently running processes, including their process identification numbers (PIDs). A process, also referred to as a task, is an executing (i.e., running) instance of a program. Every process is assigned a unique PID by the system

ps - report a snapshot of the current processes.

SYNOPSIS

ps [options]

DESCRIPTION

ps displays information about a selection of the active processes. If you want a repetitive update of the selection and the displayed information, use top(1) instead.

sed:

SED command in UNIX is stands for stream editor and it can perform lot's of function on file like, searching, find and replace, insertion or deletion. Though most common use of SED command in UNIX is for substitution or for find and replace.

Sudo:

sudo ("superuser do", or "switch user do") allows a user with proper permissions to execute a command as another user, such as the superuser.

sudo allows a permitted user to execute a command as another user, according to specifications in the /etc/sudoers file. The real and effective uid and gid of the issuing user are then set to match those of the target user account as specified in the passwdfile.

By default, sudo requires that users authenticate themselves with a password. By default, this is the user's password, not the root password itself.

Once a user has been authenticated, a timestamp is recorded and the user may use sudo without a password for a short period of time (5 minutes, unless configured differently in sudoers). This timestamp can be renewed if the user issues sudo with the -v flag.

If a user not listed in sudoers tries to run a command using sudo, it is considered an unsuccessful attempt to breach system security and mail is sent to the proper authorities, as defined at configure time or in the sudoers file. The default authority to be notified of unsuccessful sudo attempts is root. Note that the mail will not be sent if an unauthorized user tries to run sudo with the -l or -v flags; this allows users to determine for themselves whether or not they are allowed to use sudo.

sudo can log both successful and unsuccessful attempts (as well as errors) to syslog, a unique log file, or both. By default, sudo will log to syslog but this can be changed at configure time or in the sudoers file.

To edit the sudoers file, use the visudo command.

Syntax

chmod:

chmod is used to change the permissions of files or directories.

On Linux and other Unix-like operating systems, there is a set of rules for each file which defines who can access that file, and how they can access it. These rules are called file permissions or file modes. The command name chmod stands for "change mode", and it is used to define the way a file can be accessed.

Before continuing, you should read the section What Are File Permissions, And How Do They Work? in our documentation of the umask command. It contains a comprehensive description of how to define and express file permissions.

In general, chmod commands take the form:

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