Question

In: Computer Science

1.) create five different files using touch command(filenames can vary according to your choice) 2.) set...

1.) create five different files using touch command(filenames can vary according to your choice)

2.) set privileges to be 755 for each file

3.) one of your file will be a shell script which will change the privileges to be 644 for all the files.

Document your output in a word with necessary screen shots

Solutions

Expert Solution

Answer 1:

As you can see in below figure first we have don’t have 5 file like File1.c, File2.c, File3.c, File4.c, File5.c that we confirm using ls command then we create all file using touch command and check it using ls command so all file is created.

touch command mainly used when user don’t have content at the time when create the file. We Can create single as well as multiple file using touch command.

Answer 2:

          File permission is checked using command,

                                       ls –l

The file permissions give us following permission:

· First rw means the owner has read and write privileges

· Second r means the owner’s group has read privileges

· Last r means Other users have read privileges

To set privileges to be 755 for each file use command,

chmod -R 755 Filename

When this command execute then it gives read, write, and execute privileges to the owner (7) , read and execute access to owner’s group (5) and read and execute access to everyone else (5). We can check this using command,

ls –l

Answer 3:

Create shell script file which change the privileges to be 644 for all the files.

Create shell script file set.sh using command

vi set.sh

Type the content as shown in below figure and the save file using :wq command.

Run the file with bash command

bash set.sh

Check that file permission is change using command

ls -l

As you can see in the above picture that file permission is changed. It gives read, write privileges to the owner (6) , read access to owner’s group(4) and read access to everyone else (4). We can check this using command.

At any point if you have any difficulty feel free ask me.


Related Solutions

When using random access files in Java, the programmer is permitted to create files which can...
When using random access files in Java, the programmer is permitted to create files which can be read from and written to random locations. Assume that a file called "integers.dat" contains the following values: 25 8 700 284 63 12 50 Fill in blanks: You are required to write the following Java code statements: (a) create a new stream called, blueray, which allows the program to read from and write to the file, "integers.dat." _____________________ (b) Write a statement which...
Linux What is the tar command? a. Can you compress files using tar? Please explain how...
Linux What is the tar command? a. Can you compress files using tar? Please explain how and provide a brief example. b. How do you create a tar file? Please provide an example. c. How do you extract files in a tar format? Please provide an example.
1. In terms of security, why would you not use rm command to delete files? 2....
1. In terms of security, why would you not use rm command to delete files? 2. Shred and dd are tools used to securely delete files. Which is the best tool for securely deleting a file from a system and why? Consider the limitations of each tool when choosing your answer. 3. What encryption is used to encrypt HTTP traffic (HTTPS)? 4. The CIA triad , confidentiality, integrity, and availability represent the three goals for cybersecurity. Which goal(s) does/do encryption...
1. Create a prediction for period 7 using the naive model. 2. Create your forecast using...
1. Create a prediction for period 7 using the naive model. 2. Create your forecast using the naive model. Calculate all the errors for each period. What is the error for period 3? 3. What is the mean sqaured error? 4. Find the root mean squared error
Systems Programming - File Operations Create your version of the tail command in Linux using C...
Systems Programming - File Operations Create your version of the tail command in Linux using C The lseek system call allows you to move the current position anywhere in a file. The call lseek(fd, 0, SEEK_END) moves the current position to the end of the file. The tail command displays the last ten liens of a file. Try it. tail has to move, not to the end of the file, but to a spot ten lines before the end of...
Using MATLAB, Create five scripts for 5 3D polts with different views
Using MATLAB, Create five scripts for 5 3D polts with different views
Using the Internet or the Strayer databases, select a different company of your choice but this...
Using the Internet or the Strayer databases, select a different company of your choice but this time analyze the Statement of Cash Flows for that chosen company. Next, discuss the change in cash flows for the three (3) different categories of cash flows and identify the totals for each category and at least one (1) significant item in each. Be sure to interpret this information in terms of the long-term health of the company. Provide support for your response
Question 1. Your task is to create a full program for a Restaurant of your choice....
Question 1. Your task is to create a full program for a Restaurant of your choice. You will have the output appear at first saying Welcome to ______ Restaurant where the _____ will be whatever you name your restaurant Today’s choices are 1.__________ 2._________ 3._______ 4.________ NOTE each _____ will say an item and its price for example pizza 2.99 Please choose 1 of the choices. In each case, as the user picks a choice It will calculate the total...
create verilog source files for a seven segment display using the software vivado. show your steps.
create verilog source files for a seven segment display using the software vivado. show your steps.
Create a emergency pandemic plan for the sports franchise of your choice using the text CHs...
Create a emergency pandemic plan for the sports franchise of your choice using the text CHs that we have gone over to outline your plan.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT