You need to set the permissions for read, write and execute on a file called SHARE to anyone with an account on the same Linux system. Which of the following commands would NOT have the desired effect?
(A) chmod a+rwx,o=rx SHARE
(B) chmod a+rwx SHARE
(C) chmod ugo=rwx SHARE
(D) chmod 777 SHARE
A.)
B.)
C.)
D.)
Answer: A
You need to set the permissions for read, write and execute on a file called SHARE...
The current permissions for a file called SHARE are as follows: -rwx---r-- What are the resulting permissions after this command is entered? chmod og+x SHARE (A) –--x--xr-- (B) –rwx--xr-x (C) –rwx---r-- (D) –rwx—-x--x
Create an alias for setting all permissions to read, write, execute (777) in Linux
1. Write the command to set the following permissions on a script file with the following name; myscript.sh Owner: full access; read, write and execute Group: read and execute Other: no access 2. Create a new file with the name "myfirstscript.sh". Write a new script that performs the following tasks in sequence; Display the usernames of currently logged in users; sorted from a-z HINT: You will need to filter the output of the whocommand Display a list of usernames who...
9. The command "chmod 711 menu script" allows the owner read, write and execute permissions, and only permission for group and other o. Explain why you would use a "Here Document "in your shell script over using the echo commands? 11. What will the following statements provide "from the main body" when the awk script is executed? Field 1 Example: one line of input "widget: 1.59 : 83 Note! the: is the delimiter. Example: Unit-widget, price per/unit -$1.59, quantity number...
Write a program in C using Unix system calls and functions that will change the permissions on a file. The executable shall be called “mychmod” and will be executed by: mychmod -u rwx -g rwx -o rwx -U rwx -G rwx -O rwx file1 file2 ... The lowercase options will add permissions while the uppercase options will remove permissions. Each of the switches is optional and should be interpreted as the ones in the Unix command chmod(1), you can review...
operating system programming
i need ans and explen after 20 min
2 When we are implementing the following program, then we press "CTRL+C" on the keyboard; that will cause: #include <stdio.h> #include<signal.h> #include <stdlib.h> #include<unistd.h> void handle_sigint (int sig) { } printf("Caught signal $d\n", sig); int main(int argc, char *argv[]) { signal (SIGCONT, handle_sigint); while (1) { printf("the process id is $d \n",getpid()); sleep (1); } return 0; } O print the sentence" Caught signal 2" on the terminal 53,65,67,37,14,98,122,124,183...
Using Unix processes Submit a README file that lists the files you have submitted along with a one sentence explanation. Call it Prj1README. MakeCopy.c : Write a C program that makes a new copy of an existing file using system calls for file manipulation. The names of the two files and copy block sizes are to be specified as command line arguments. Open the source file in read only mode and destination file in read/write mode. ForkCopy.c : Write a...
Purpose
This assignment should give you experience in using file
descriptors, open(), close(), write(), stat() and chmod(),
perror(), and command line arguments.
Program
Write a C++ program that will allow you to add messages to a
file that has NO permissions for any user.
A Unix system has many files that have sensitive information in
them. Permissions help keep these files secure. Some files can be
publicly read, but can not be altered by a regular user (ex.:
/etc/passwd). Other...
Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...
in c++ please
HW09: Read/Write File Ints Now that we've had a taste of what file I/O is all about, here's your chance to try it out on your own! You're to write a program that will prompt the user if he/she would like to read ints from a file (and have them displayed to stdout) or write ints to a file for safekeeping. If the user wishes to save a set of numbers, then the file nums.txt is opened...