You are to create a hard link to one of your existing files on someone else's directory (or vice versa). In other words, you know that you can link a file within your own directories, but you can also have a link to one of your files on other areas of the unix system as long as you have permissions to write to that directory (in this case, your partner).
Create a subdirectory called temp where you can place this temporary link.
Remember that you do not link a file to another file. You create
a hard link to an existing file.
So, user A has file1 that he/she wants to
give access to user B. User B has to open certain
directory permissions, for this to happen, then User A can
create the link on user B directory (user A NEVER goes to user B
directories typing cd), but if permissions are opened correctly all
the commands will be done from user A directory without shell error
messages such as “can not access..”.
The question? what did you have to do for this work? Describe
ALL the steps showing the commands. Be very precise on these steps.
A person should be able to take step by step described and
accomplish the task of creating a hard link. Make sure to
be precise. I should be able to follow these steps and create the
link (BE COMPLETE). This will be like a recipe, I will need to type
each step and complete this task showing the commands.
step 1. ... user B opened permissions... (show command
chmod ..... )
step 2. ... user A creates a directory and changed permissions,
chmod ...
step 3..
The 2 persons reading the steps will be able to accomplish this task as if they have never done this before. (the first time that you bake a cake, instructions need to be complete and precise to work). It is not a narrative, it is a step by step solution.
In: Computer Science
A review of the ledger of Khan Company at 31 December 2012 produces the following data pertaining to the preparation of annual adjusting entries.
1. Prepaid Insurance $9 800. The company has separate insurance policies on its buildings and its motor vehicles. Policy B4564 on the building was purchased on 1 July 2011, for $6 000. The policy has a term of 3 years. Policy A2958 on the vehicles was purchased on 1 January 2012 for $4 800. This policy has a term of 2 years.
2. Unearned Subscriptions $49 000. The company began selling magazine subscriptions in 2012 on an annual basis. The magazine is published monthly. The selling price of a subscription is $50. A review of subscription contracts reveals the following
Subscription Date: Number of Subscription:
1 October 200 1 November 300 1 December 480 980 3. Notes Payable $40 000. This balance consists of a note for 6 months at an annual interest rate of 9%, dated 1 September. 4. Salaries Payable $0. There are eight salaried employees. Salaries are paid every Friday for the current week. Five employees receive a salary of $500 each per week, and three employees earn $800 each per week. 31 December is a Wednesday. Employees do not work weekends. All employees worked the last 3 days of December.
Instruction: Prepare the adjusting entries as at 31 December 2012.
In: Accounting
Discuss attached Advertisement . ( Compulsory Question )
The attached Advertisement came in Gulf News Magazine on 17th July 2020. The magazine called as “ FRIDAY lite “ come along with Gulf news every Friday . The Ad was on last outside page of the Magazine. You have to discuss about the important parts of print Ad and for what aim and objective it is advertised. ( The word limit to express your Answer is open) Advertisement is attached below on Moodle .
In: Operations Management
Give an example of when directory information would be needed.
In: Nursing
2. In wooly mammoths 50,000 years ago, the presence of a curled tusk allele (t) was recessive to a straight tusk allele (T). In Siberia populations, the frequency of the curled tusk allele was 0.85. Across the ice bridge in North America, the frequency of the curled tusk allele was 0.18. One thousand years later, the frequency of the curled tusk allele in the North America population was now 0.55. Of the wooly mammoths that currently reside in North America, what proportion of them must have migrated from Siberia to result in the increase in the curled tusk allele? (4 points)
3. Charles Xavier (a.k.a. Professor X) is researching mutants in the United States using his machine, Cerebro. There are many mutants with many different abilities, but every mutant power has a common epistatic “control” gene. The alleles for this gene are labeled “C” and “c”. If an individual has a gene that codes for a certain ability, that ability will not express itself unless the control gene has two recessive alleles. Knowing this, Professor X wants to track this control gene, and evaluate its mutation rate throughout the American population. Note that a mutation from C to c is a forward mutation and from c to C is a reverse mutation. Of the 318,000,000 people tracked through Cerebro, 11,943 experienced forward mutations and 25,937 experienced reverse mutations. What are the forward and reverse mutation rates? What are the C and c allele frequencies, assuming this population is in equilibrium? Are mutants on the rise or decline in the U.S. population? (5 points)
In: Biology
The purchase of which of the following products is most affected by interest rates?
A) Around-the-world cruise
B) Season tickets to a sporting event
C) Motorcycle
D) Apartment
In: Finance
In: Operations Management
Python
Add a command to this chapter’s case study program that allows the user to view the contents of a file in the current working directory. When the command is selected, the program should display a list of filenames and a prompt for the name of the file to be viewed.
Be sure to include error recovery in the program. If the user enters a filename that does not exist they should be prompted to enter a filename that does exist.
An example of the program input and output is shown below:
/root/sandbox 1 List the current directory 2 Move up 3 Move down 4 Number of files in the directory 5 Size of the directory in bytes 6 Search for a file name 7 View the contents of a file 8 Quit the program Enter a number: 7 Files in /root/sandbox: filesys.py example.txt Enter a file name from these names: example.txt THIS IS CONTENT OF AN EXAMPLE FILE. /root/sandbox 1 List the current directory 2 Move up 3 Move down 4 Number of files in the directory 5 Size of the directory in bytes 6 Search for a file name 7 View the contents of a file 8 Quit the program Enter a number: 8 Have a nice day!
Code to use:
"""
File: filesys.py
Project 6.6
Provides a menu-driven tool for navigating a file system
and gathering information on files.
Adds a command to view a file's contents.
"""
import os, os.path
QUIT = '8'
COMMANDS = ('1', '2', '3', '4', '5', '6', '8')
MENU = """1 List the current directory
2 Move up
3 Move down
4 Number of files in the directory
5 Size of the directory in bytes
6 Search for a file name
8 Quit the program"""
def main():
while True:
print(os.getcwd())
print(MENU)
command = acceptCommand()
runCommand(command)
if command == QUIT:
print("Have a nice day!")
break
def acceptCommand():
"""Inputs and returns a legitimate command number."""
while True:
command = input("Enter a number: ")
if not command in COMMANDS:
print("Error: command not recognized")
else:
return command
def runCommand(command):
"""Selects and runs a command."""
if command == '1':
listCurrentDir(os.getcwd())
elif command == '2':
moveUp()
elif command == '3':
moveDown(os.getcwd())
elif command == '4':
print("The total number of files is", \
countFiles(os.getcwd()))
elif command == '5':
print("The total number of bytes is", \
countBytes(os.getcwd()))
elif command == '6':
target = input("Enter the search string: ")
fileList = findFiles(target, os.getcwd())
if not fileList:
print("String not found")
else:
for f in fileList:
print(f)
# add your condition here
def viewFile(dirName):
# write your code here
print("")
def listCurrentDir(dirName):
"""Prints a list of the cwd's contents."""
lyst = os.listdir(dirName)
for element in lyst: print(element)
def moveUp():
"""Moves up to the parent directory."""
os.chdir("..")
def moveDown(currentDir):
"""Moves down to the named subdirectory if it exists."""
newDir = input("Enter the directory name: ")
if os.path.exists(currentDir + os.sep + newDir) and \
os.path.isdir(newDir):
os.chdir(newDir)
else:
print("ERROR: no such name")
def countFiles(path):
"""Returns the number of files in the cwd and
all its subdirectories."""
count = 0
lyst = os.listdir(path)
for element in lyst:
if os.path.isfile(element):
count += 1
else:
os.chdir(element)
count += countFiles(os.getcwd())
os.chdir("..")
return count
def countBytes(path):
"""Returns the number of bytes in the cwd and
all its subdirectories."""
count = 0
lyst = os.listdir(path)
for element in lyst:
if os.path.isfile(element):
count += os.path.getsize(element)
else:
os.chdir(element)
count += countBytes(os.getcwd())
os.chdir("..")
return count
def findFiles(target, path):
"""Returns a list of the file names that contain
the target string in the cwd and all its subdirectories."""
files = []
lyst = os.listdir(path)
for element in lyst:
if os.path.isfile(element):
if target in element:
files.append(path + os.sep + element)
else:
os.chdir(element)
files.extend(findFiles(target, os.getcwd()))
os.chdir("..")
return files
if __name__ == "__main__":
main()
In: Computer Science
When calories are 1200 through 1800: “Diet is on target.”
When calories are 2000 through 2550: “Calorie intake ok if active.”
When calories are any other value: “Calorie intake is either insufficient or too much!”
while(cruise)
{
System.out.printf(“%nChoose a number from 1 through 4 to find out “
+ “which cruise you have won: “);
choice = input.nextInt();
if(choice == 1)
{
destination = “Bahamas”;
}
else
{ if(choice == 2)
{
destination = “British Isles”;
}
else
{ if(choice == 3)
{
destination = “Far East”;
}
else
{ if(choice == 4)
{
destination = “Amazon River”;
}
else
{
System.out.printf(“%nInvalid choice! Enter “
+ “5 to continue or 0 to exit: ”);
choice = input.nextInt();
}//END if choice = 4 else NOT = 4
}//END if choice = 3 else NOT = 3
}//END if choice = 2 else NOT = 2
}//END if choice = 1 else NOT = 1
if(choice >= 0 && choice < 5)
{
cruise = false;
}//END if choice from 1-4
}//END while cruise is true
System.out.printf(“%nYou have won a cruise to the %s!”, destination);
In: Computer Science
JTC purchased call options on Flynn common shares on July 7, 2020, for $200 as a speculative investment. The call options give JTC the right to buy 100 shares at a strike price of $20 each. The options expire on January 31, 2021.
The following data is observed through 2020:
| Flynn Stock Price | Option Time Value | |
| July 7, 2020 | $20 | $200 |
| September 30, 2020 | $18 | $150 |
| December 31, 2020 | $22 | $90 |
a. At September 30, 2020, the options are on JTC's balance sheet at a value of ? Muliple Choice: ["$350", "$150", "$200", "$1,950"].
b. In the fourth quarter (October - December) of 2020, JTC records a loss in time value of? Muliple Choice: ["$150", "$90", "$110", "$60"].
c. At December 31, 2020, the options are on JTC's balance sheet at a value of? Muliple Choice: ["$260", "$350", "$460", "$490", "$200", "$290"].
In: Finance