Question

In: Computer Science

Create a file named work.sh in your hw5 directory. Give this file read and write permission...

  1. Create a file named work.sh in your hw5 directory.
    Give this file read and write permission (no execute permissions) for you alone.
    No other account should have any access privileges to this file.
  2. Change the permissions on the work.sh file so you have read and write permissions.
    Give everybody else, including the group, read permissions only.
  3. Give yourself read, write and execute permissions to the file work.sh.
    Give everyone else, including the group, execute permissions only.
  4. Create a directory named dir1 in your hw5 directory.
    Give all users, including the group, read, write and execute access to this directory.
  5. Create a directory named dir2 in your hw5 directory.
    Give yourself read, write and execute permissions on this directory.
    Give the group and everyone else only those permissions which will let them run ls on this directory, but nothing else.
  6. Create a directory named dir3 in your hw5 directory.
    Give yourself full permissions to this directory.
    Give only the group the ability to run ls on this directory and to cd into it.
    Give everyone else no privileges on this directory.
  7. Make sure you are in your hw5 directory.
    Create a symbolic link named homework in your current directory to your hw directory.
  8. Use the homework link you just created to go to your hw directory.
  9. Go back to your hw5 directory.
    Show the true location of this directory in the /courses hierarchy.
  10. Go to your home directory.
    Perform a long listing to see the absolute pathname of your it244 directory.
    cd into this directory using an absolute pathname.
    This pathname must include the /courses directory.
    Show your new location.

Solutions

Expert Solution

Assuming that you are in hw5 directory

Create a file named work.sh in your hw5 directory

cat > work.sh

Give this file read and write permission (no execute permissions) for you alone.
No other account should have any access privileges to this file.

Change the permissions on the work.sh file so you have read and write permissions.

chmod u=rw work.sh

Give everybody else, including the group, read permissions only.

chmod go+r work.sh

Give yourself read, write and execute permissions to the file work.sh

chmod u=rwx work.sh

 

Give everyone else, including the group, execute permissions only.

chmod go+x work.sh

Create a directory named dir1 in your hw5 directory

Mkdir dir1

Give all users, including the group, read, write and execute access to this directory

chmod gou+rwx dir1
 

Create a directory named dir2 in your hw5 directory

Mkdir dir2

Give yourself read, write and execute permissions on this directory.

chmod u+rwx dir2
 

Give the group and everyone else only those permissions which will let them run ls on this directory, but nothing else.

chmod go+rx dir2

Create a directory named dir3 in your hw5 directory

mkdir dir3

Give yourself full permissions to this directory.

chmod u+rwx dir3
 

Give only the group the ability to run ls on this directory

chmod g+rx dir3

Give everyone else no privileges on this directory

chmod o-rwx dir3 

Create a symbolic link named homework in your current directory to your hw directory.

ln -s [hw5] [homework]
 

Show the true location of this directory in the /courses hierarchy.

pwd


Related Solutions

In the funcs directory create a file named funcs.py. This section requires that you implement and...
In the funcs directory create a file named funcs.py. This section requires that you implement and test multiple functions. You should develop these functions and their tests one at a time. The function implementations must be placed in funcs.py. The test cases will, of course, be placed in the provided funcs_tests.py. You must provide at least two test cases for each of these functions. In addition, you should separate your testing into multiple functions (the file includes stubs for the...
​​​​Python Create a new file named compute_cost.py. Write your name and date in a comment. Create...
​​​​Python Create a new file named compute_cost.py. Write your name and date in a comment. Create a variable named base_fee and set the value to 5.5. Prompt the user for the zone. The zones can be an integer value from 1 to any value for the zone. Convert the zone to an integer. Display the zone on the SenseHat with a scroll speed of 0.3, make the text blue, and the background yellow. Scroll "The zone is " and the...
Go to your “Documents” directory; a) Create a file “file1” with the text “hello” in it;...
Go to your “Documents” directory; a) Create a file “file1” with the text “hello” in it; Provide command and screenshot. b) Create a hard link named “file2” linked to “file1”; c) Create a soft link named “soft1” linked to “file1”; create another soft link named “soft2” linked to “file2”. d) View information of the 4 files (what command should you use to produce output) – how do you verify which file is a hard link and which file is a...
UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all...
UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all its contents. Write a shell script to validate password strength. Here are a few assumptions for the password string.   Length – a minimum of 8 characters. • Contain alphabets , numbers , and @ # $ % & * symbols. • Include both the small and capital case letters. give a prompt of Y or N to try another password and displays an error...
Linux Use touch to create a file in your working directory called PutFileHere this is a...
Linux Use touch to create a file in your working directory called PutFileHere this is a linux question i acidentally put javascript when i first submitted it
In a UNIX-like file system, a directory typically contains: A. filenames and i-nodes B. permission information,...
In a UNIX-like file system, a directory typically contains: A. filenames and i-nodes B. permission information, pointers to direct blocks C. filenames and ownership information D. filenames, i-nodes, major device numbers and minor device numbers
Create a file named StudentArrayList.java,within the file create a class named StudentArrayList. This class is meant...
Create a file named StudentArrayList.java,within the file create a class named StudentArrayList. This class is meant to mimic the ArrayList data structure. It will hold an ordered list of items. This list should have a variable size, meaning an arbitrary number of items may be added to the list. Most importantly this class should implement the interface SimpleArrayList provided. Feel free to add as many other functions and methods as needed to your class to accomplish this task. In other...
You first needs to create a file called “myJS.js” in your project directory. Then, include the...
You first needs to create a file called “myJS.js” in your project directory. Then, include the AngularJS library and myJS.js in the header of the index.html page. Now, you need to define your angular application and a controller in this file such that the controller has the following variables with these initial values: name = "Alex Cool"; faculty= "Faculty of Busienss and IT"; university = {name:"University of Ontario Institute of Technology", url:"http://www.uoit.ca"}; contacts = {email:"[email protected]", phone:"xxx-xxx-xxxx"}; skills = [ {name:...
Part II: gdb (Debugging under Unix) create a new directory named by Inlab6Part2 enter the directory...
Part II: gdb (Debugging under Unix) create a new directory named by Inlab6Part2 enter the directory Inlab6Part2 create a file named by reverse_new.c with the following contents: /*reverse.c */ #include <stdio.h> void reverse(char *before, char *after); main() {       char str[100];    /*Buffer to hold reversed string */       reverse("cat", str); /*Reverse the string "cat" */       printf("reverse(\"cat\")=%s\n", str); /*Display result */       reverse("noon", str); /*Reverse the string "noon" */       printf("reverse(\"noon\")=%s\n", str); /*Display result */       } void reverse(char *before,...
Create a console application named TakeHomePay.cs under your homework directory (please refer to the earlier recorded...
Create a console application named TakeHomePay.cs under your homework directory (please refer to the earlier recorded Zoom sessions if you are not sure how to do it) that calculates the take-home pay for an employee. The two types of employees are salaried and hourly. Allow the user to input the employee’s first and last name, id, and type. If an employee is salaried, allow the user to input the salary amount. If an employee is hourly, allow the user to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT