Please Complete Answers Intro to OS Exam 1 1---Explain what each of the followin
ID: 3712119 • Letter: P
Question
Please Complete Answers
Intro to OS Exam 1 1---Explain what each of the following commands do, as well as which operating system uses them (1.5 pts each):
Mv
Robcoppy
Type
Cat
PS
Sed
1--What is the permission string (RWXRWXRWX format) of the number 311 (2 pts)
2---What is the base directory of a file system called on windows (1pt), and on linux (1 pt).
3---What does the term 'super user' mean in terms of operating systems (2 pts).
4--- 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
Answer:
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.
3)Answer:
super user:
the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor.
A superuser is a special user account for general system administration such as in networks and databases. It is a variation of the administrator user, which varies depending on the operating system and context. Most commonly, superuser refers to the most privileged user account in the Android mobile operating system, which can be activated by rooting the device.