Question: 1. Write a command to display the contents of your current directory; the listing should show the permissions on each entry and should include any
1. Write a command to display the contents of your current directory; the listing should show the permissions on each entry and should include any hidden files in the directory:
2. Write the command to move to the etc directory, which is inside the root directory; use an absolute path in your answer:
3. What command could you issue to create a new system group called jdoegroup on your system:
4. What command could you use to install the lynx program on your fedora (red hat) system, assuming you had not yet downloaded any package files needed for the application:
5. Assume a file called newdata is in the /home directory while you are currently in the /home/myname directory. Using relative paths, write a single command to copy the file newdata to your current directory:
6. Write the command to display the contents of a file in your current directory called notes so that you have forward and backward page control and the display shows line numbers on each line:
7. Write a command to display only the 22nd line of the notes file (which is in your current directory):
8. Assume there is a file called errorlog in the /root directory (i.e., a directory called root inside the actual system root directory) and you wish to display the contents, but do not have permission to read the file. You are, however, a member of the admin group. Write a command to display the file (while logged in as your current user):
9. You wish to set the permissions on a file called prog1 in your current directory to: -rwxr-x-wx. Write the chmod command to do this using octal syntax:
10. Assuming you have separate files called: file1, program2, and scriptC in your current directory, write a single command to put copies of each of these files in the directory: allfiles which is a subdirectory of the root directory (you have required permissions):
11. Assume you have two files called PartA and PartB in your current directory, and you wish to combine these files vertically (one after the other without a break) into a file called PartBA such that the contents of file PartB appear first followed by the contents of file PartA. Write the command for this:
12. After logon, what command do you issue to change to the system admin user (root user):
13. A file called actionlog is in the /boot directory (you are in your home directory) and you wish to display all lines from that file which have the word linux in them; write the command to do this without changing directories:
14. Write the command (for systemd systems like Fedora and Red Hat) that will check whether the SELinux security process is running in enforcing or permissive mode:
15. You wish to add the contents of file notes (in your current directory) to the file allnotes (also in your current directory. Write a command to perform this using redirection of output:
16. Write a single command to create a new directory tree called mystuff/archive/progs which is to be a subdirectory of your current directory (none of the new directories exist):
17. Write the command to create a new user calls IS264User and make that user a member of the IS264 group (which already exists):
18. After running top in the background, you now type ps and receive the following result: PID TTY TIME CMD 13698 pts/3 00:00:00 bash 13742 pts/3 00:00:00 top 13744 pts/3 00:00:00 ps Write the command to terminate the top process (make sure it will terminate, regardless of system status):
19. Assume that you wish to delete the directory called garbage and all its subdirectories, and that garbage is a subdirectory of your current directory, but you do not know if garbage has any other files in it. Write single command to accomplish this:
20. Assume that you attempt to execute a script called ShowStats but receive the message permission denied. Write an alternate command that should work without actually changing permissions on the file (assume you have read permission on the file):
21. After logon, write the command to check the status of a service called carpald is running and active on your system:
22. Write the systemd command to check whether the firewall process is loaded and active:
23. Write a command to display the available network interfaces on your machine including the current MAC and IP addresses:
24. Using relative paths, type the command to copy the file somethingnew which is in your current directory into your parent directory changing the name to somethingold. After the operation the file somethingnew should no longer exist in your current directory. Also, the command should warn you if you are about to overwrite an existing file
25. Write the (combined) command such that script adddata will run only if the script datacheck runs successfully before trying to run adddata:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
