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

​​​​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
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:...
Write a script that prompts the user for a pathname of a file or directory and...
Write a script that prompts the user for a pathname of a file or directory and then responds with a description of the item as a file along with what the user's permissions are with respect to it (read, write, execute).
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...
Move the file “nfile2” into the “unix” directory. Copy the file “nfile1” into the “java” directory....
Move the file “nfile2” into the “unix” directory. Copy the file “nfile1” into the “java” directory. Show how you would create the files “test1”, “test2”, & “test3” in the “test” directory to ensure that they have the same file creation date/time. From the ~ folder, use the * and then the [ ] wildcard procedures to list all the files in the “test” directory. From the directory structure above, give an example of a relative path & an absolute path....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT