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

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...
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...
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
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:...
Python program: Write a program that reads a text file named test_scores.txt to read the name...
Python program: Write a program that reads a text file named test_scores.txt to read the name of the student and his/her scores for 3 tests. The program should display class average for first test (average of scores of test 1) and average (average of 3 tests) for each student. Expected Output: ['John', '25', '26', '27'] ['Michael', '24', '28', '29'] ['Adelle', '23', '24', '20'] [['John', '25', '26', '27'], ['Michael', '24', '28', '29'], ['Adelle', '23', '24', '20']] Class average for test 1...
Write a bash script file that tests each file entry in the current directory. It should...
Write a bash script file that tests each file entry in the current directory. It should determine if it is a file or directory. If it is a file, it will determine if it is readable or not. If it is readable, it will display only the first 4 lines to the terminal in sorted order (just sort the first 4 lines). If it is a directory, it should display the contents of that directory (the files and subdirectories). NOTE:...
(Write/read data) Write a Program in BlueJ to create a file name Excersise12_15.txt if it does...
(Write/read data) Write a Program in BlueJ to create a file name Excersise12_15.txt if it does not exist. Write 100 integers created randomly into the file using text I/O. Integers are separated by spaces in the file. Read data back from the file and display the data in increasing order. After writing the file to disk, the input file should be read into an array, sorted using the static Arrays.sort() method from the Java API and then displayed in the...
Write a program named FinalExamProgram2 that reads numbers from a file (which you will create using...
Write a program named FinalExamProgram2 that reads numbers from a file (which you will create using Notepad) into a one-dimensional array and then analyzes the numbers as described below. Your program must use loops to read the numbers into the array and to analyze the contents of the array. The program’s main function should do the following:  Read eight floating-point numbers from the file named numbers.txt into a onedimensional array, displaying each number on the screen.  Pass the...
USING JAVASCRIPT Create a file name dayOfWeek.js and write an arrow function named dayOfWeek that accepts...
USING JAVASCRIPT Create a file name dayOfWeek.js and write an arrow function named dayOfWeek that accepts a Date object dateStr and returns a string that is the day of the week in English form (i.e. “Sunday”, “Monday”, etc.). Test your function by creating a date object that is a significant date to you (such as your birthday) and passing that date object to your function. Test your function at least twice with two different dates. Submit the dayOfWeek.js file to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT