Questions
Given this data: drwxr-xr-x 2 asmith staff 4096 Feb 6 19:44 scripts Answer questions 6 through 13.
6. In the line above, what does the d on the extreme left mean or refer to?
7. What does the letter r mean?
8. What does the letter w mean?
9. What does the letter x mean?
10. On what date was the directory in the line above last modified?
11. To whom or what does the leftmost rwx apply?
12. To whom or what does the middle r-x apply?
13. To whom or what does the rightmost r-x apply?
14. If you are in the current directory and wanted to display the name of every file and every line in each of those files where the word calculate occurred, what would you type?
15. Which command displays a calendar of the current month and highlights the current day?
16. If you wanted to display a list of all the processes running on a computer, what command would you use?
17. echo $USER provides the same information as what other command?
18. In a bash script, to what does $1 refer?
19. Let's say we have a variable in script named amount. To what does $amount refer? (Note the $.)
20. The bash statement
sum_of_scores=$(($sum_of_scores+$score)) demonstrates which one of
the following?
A. No sensible person would use bash to do arithmetic.
B. bash arithmetic expressions are straightforward and simple
Given this data: drwxr-xr-x 2 asmith staff 4096 Feb 6 19:44 scripts
Answer questions 6 through 13.
6. In the line above, what does the d on the extreme left mean
or refer to?
Answer: d on the extreme left mean or refer to
'Directory' on Linux machines, which means 'Folder' on Windows
machines. Here, the 'scripts' is the directory.
7. What does the letter r mean?
Answer: r means Read permission for the
directory.
8. What does the letter w mean?
Answer: w means Write permission for the
directory.
9. What does the letter x mean?
Answer: x means Execute permission for the
directory.
10. On what date was the directory in the line above last
modified?
Answer: The directory in the line above was last
modified on 6th of February at Time: 19 hours: 44 minutes PM, in
the evening.
11. To whom or what does the leftmost rwx apply?
Answer: The leftmost rwx permissions apply to the
Owner or user of the 'scripts' directory who created it and is
owned.
12. To whom or what does the middle r-x apply?
Answer: The middle r-x permissions apply to Group
of the 'scripts' directory who is owning the directory.
13. To whom or what does the rightmost r-x apply?
Answer: The rightmost r-x permissions apply to the
Other users or to the rest of the users in the world for them to
only have read and execute permissions on the directory.
15. Which command displays a calendar of the current month and
highlights the current day?
Answer: The command is:
cal
It displays the current month's calendar and the current day
highlighted.
Answer: The command is:
ps
OR,
top
atop
pgrep
pstree
htop
ps -aux | less
This ps command displays all running processes.
The ps, top, atop, pgrep, pstree, or htop commands.
top command: It lists and updates sorted information about Linux
processes.
atop command: It lists the advanced system and process monitor for
Linux.
htop command: It is an interactive process viewer in Linux.
pgrep command: Using this command you could look up or signal
processes per name and other attributes.
pstree command: This lists a tree of processes.
14. If you are in the current directory and wanted to display
the name of every file and every line in each of those files where
the word calculate occurred, what would you type?
Answer: grep -r 'calculate' *
The above command is used to search in all files under the current directory recursively using grep -r.
When it is required to search in all the files under the current directory and its subdirectory, -r option is the option to be used.
17. echo $USER provides the same information as what other
command?
Answer: The below command provides the same information as echo
$USER command.
whoami
It displays the user's name who typed in this command.
18. In a bash script, to what does $1 refer?
Answer: The $1 refers to the positional parameter in a bash script.
It is a parameter indicated by one or more digits other than the
single digit 0.
It is denoted as:
$N where N consists of a single digit.
It is the argument passed to the script from the command line
such as $0, $1, $2, $3 . . .
$1 is the first argument.
Questions Given this data: drwxr-xr-x 2 asmith staff 4096 Feb 6 19:44 scripts Answer questions 6...
Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...
do numbers 4-8
4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...
1 Overview and Background Many of the assignments in this course will introduce you to topics in computational biology. You do not need to know anything about biology to do these assignments other than what is contained in the description itself. The objective of each assignment is for you to acquire certain particular skills or knowledge, and the choice of topic is independent of that objective. Sometimes the topics will be related to computational problems in biology, chemistry, or physics,...
could you please help me with this problem, also I
need a little text so I can understand how you solved the
problem?
import java.io.File; import java.util.Scanner; /** *
This program lists the files in a directory specified by * the
user. The user is asked to type in a directory name. * If the name
entered by the user is not a directory, a * message is printed and
the program ends. */ public class DirectoryList { public static...
Case 2: Going to The X-Stream Gil Reihana is the chief executive officer of X-Stream, an Auckland-based company that assembles personal computers for the New Zealand and Australian markets, and sells them through a number of chain stores and independent retailers. He started the company six years ago, at the age of 25, after graduating from university with a Bachelor’s degree in Information Technology and Management. To establish the company, Reihana invested $300 000 he had inherited and persuaded various...
Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...
What an Executive Summary Is
An executive summary is a specific type of document that does
two things: it summarizes a research article, and it offers
recommendations as to how information from the article can be
used.
Some long reports can contain an executive summary section, as
indicated in the Pearson handbook.
Write a 2 pahe Executive Summary
In business contexts, an executive summary is always written
for a specific purpose: to explain the information in the article
to a...