LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN: 9781337569798
Author: ECKERT
Publisher: CENGAGE L
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 7, Problem 4DE
Name the test statement that can be used to test the following scenarios:
- a. The user has read permission to the /etc/hosts file.
- b. The user has read and execute permission to the /etc directory.
- c. The contents of the variable $TEST are equal to the string “success.”
- d. The contents of the variable $TEST are numerically equal to the contents of the variable $RESULT.
- e. The contents of the variable $TEST are equal to the string “success” and the file /etc/hosts exists.
- f. The contents of the variable $TEST are equal to the string “success,” or the number 5, or the contents of the variable $RESULT.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
$readmemb is used to initialize memory from a text file in hexadecimal values.
True
False
It is a keyword used in the HDL code to import the hexadecimal contents of a text file into a memory variable.
"When iCE is disabled in the memory module, the output in the tWbus is zero."
True
False
When iCE is enabled in the memory module, the output in the tWbus is the memory address."
True
False
eg [6:0] Memory [0:16] means the memory contains ___ bits per address
17
7
6
16
When iCE is disabled in the memory module, the output in the tWbus is high impedance"
True
False
NEED ANSWERS QUICK NO EXPLANATION NEEDED
. Write a program that asks the user for the name of a file, and an integer number. The program should display the first several lines of the file on the screen, and the number of lines should be equal to the integer entered by the user. If the number of lines the file has is less than the integer entered by the user, then the entire file should be displayed, with a message indicating the entire file has been displayed.
When evaluating the peer submissions, please consider two cases to verify the program, with one case where the file has enough lines, and one case where the file does not have enough lines. This question belongs to c++.
Unix-based operating systems usually include a tool named tail. It displays the last 10 lines of a file whose name is provided as a command line argument. Write a Java program that provides the same behavior i.e. the user can specify how many lines to print from the terminal. Display an appropriate error message if the file requested by the user does not exist, or if the command line argument is omitted.
Note: Make sure to display the last n lines of a file whose name is provided as a command line argument. You might need to pass a file as an argument, therefore make sure to have access to a sample file, the contents of which you want to print out.
Chapter 7 Solutions
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Are reflex actions (such as flinching from a hot stove) rational? Are they intelligent?
Artificial Intelligence: A Modern Approach
The following C++ program will not compile because the lines have been mixed up. cout Success\n; cout Success...
Starting Out with C++ from Control Structures to Objects (8th Edition)
Type in and run the six programs presented in this chapter. Compare the output produced by each program with th...
Programming in C
Convert each of the following binary representations to its equivalent base ten form: a. 101010 b. 100001 c. 10...
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
An online or hard-copy repository for all project correspondence, inputs, outputs, deliverables, procedures, an...
Essentials of Systems Analysis and Design (6th Edition)
PERSON AND CUSTOMER Classes Design a class named Person with properties for holding a persons name, address, an...
Starting Out With Visual C# (5th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- You have redirected stderr to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why? a. After you open the file and view the contents, the contents are lost. b. The system generated different stdout. c. You did not append the stderr to the Error file, and, as a result, it was overwritten when the command was run a second time. d. You must specify a new file each time you redirect as the system creates the specified file by defarrow_forwardWrite a program that asks the user for the name of a text file. The program should display the last 10 lines of the file on the screen (the “tail” of the file). If the file has less than 10 lines, the entire file is displayed, with a message that the entire file has been displayed. The program should do this by seeking to the end of the file and then backing up to the tenth line from the end.arrow_forwardWrite a program to ask the user to enter (i) a filename and (ii) regular expression. The program should count the number of lines that matched the regular expression. Example: Enter a filename: "mbox.txt"Enter a regular expression: ^AuthorExpected output: mbox.txt had 1798 lines that matched ^Authorarrow_forward
- Which of the following statement is true? a. Code in finally block is not executed whether exceptions are thrown or not b. Code in finally block is executed whether exceptions are thrown or not. c. Each try block must have more than one finally block d. Code in finally block is executed only if exceptions are thrown.arrow_forwardThe history teacher at your school needs help in grading a True/False test. The students’ IDs and test answers are stored in a file. The first entry in the file contains answers to the test in the form:TFFTFFTTTTFFTFTFTFTTEvery other entry in the file is the student ID, followed by a blank, followed by the student’s responses. For example, the entry:ABC54301 TFTFTFTT TFTFTFFTTFTindicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and so on. This student did not answer question 9. The exam has 20 questions, and the class has more than 150 students. Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points. Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed by the test score, followed by the test grade. Assume the following grade scale:90%–100%, A; 80%–89.99%, B; 70%–79.99%, C; 60%–69.99%, D; and…arrow_forwardModify your code so that before the game begins, the player is asked whether they wish to enter their guesses manually, or to automatically guess based on pre-supplied guesses in a file. If the first option is chosen, then the game should progress in the same fashion as in the tasks above. If the second option is chosen, then the following actions should be taken: Firstly, the player should be asked to enter a filename. If the player enters an invalid filename, they should be re-prompted until they enter the name of a file that actually exists. This file should then be read and interpreted as a text file, where each line contains a separate guess. For example, a sample file input.txt may contain the following text: 1234 4321 5830 8437 1489 3271 2530 You may assume that each line of the file contains a valid guess. Once the file has been read, then the game should proceed as normal. However, when the player would be prompted to enter a guess, the next guess in the list of pre-supplied…arrow_forward
- Given a valid file object, f, which of the following calls will return the entire contents of the file in a scalar x? x = f.readline() x = f.readlines() x = f.read() X = read(f)arrow_forwardTopic: Server Side Development How do you tell the server that session variables are being used? You do not have to add any special code. The server handles session variables automatically. Include the code: $_SESSION['sessionVarName'] = $varName; exchanging varName with the name of the variables for your program. Include the code: session_start(); as the first line in each function that uses a session variable. Include the code: session_start(); at the very top of the Web page.arrow_forwardThere are two java classes called Server and Client that you need to develop. Server class will accept connections from port 8900 and listen for characters coming from the client in a loop. When the "0" (zero) character is received by the client, it will convert all the characters that have come so far into a String and write it to a text file named "incoming_text.txt" (you can use the FileWriter class) and terminate the Server application. The Client class will connect to the Server application that listens to the 8900 port of the computer with the IP number 127.0.0.1 and will transfer each character that the Client user enters one by one from the keyboard (the characters will be taken one by one with the help of a loop) to the Server application one by one. If the client user enters the "0" (zero) character, it will stop receiving input from the user, transmit the "0" character to the Server application and terminate the Client application. The sample console output of the…arrow_forward
- Suppose I wrote a simple program to take in a filename from a user and then, using that given filename my program would execute a command to copy that file to a particular location (such as my own submission directory). I then made that program executable by someone else. For example, if they gave me a filename "dog.txt", my program would create a string called "cp dog.txt subfolder" and then execute it using the system command. What would I need to do to ensure that nothing malicious was allowed to happen?arrow_forwardIf wrong answer this time will downvote it Create a class with a static main that tests the ability to resolve and print a Path: • Create an instance of a FileSystem class. • Resolve an instance of a Path interface from a directory path and filename. • Print the constructed Path with System.out.println() method. 2. Create a class with a static main that tests the ability to resolve and print a Path: • Create an array of Path class. • Instantiate instances of Path with absolute and relative paths. • Print the constructed elements of the array of Path class with System.out.println() method. 3. Create a class to test serialisation class that implements serializable, it should implement the following: • A static void method that serialises an object. • A static void method that deserializes an object. • A static main method that tests the two by moving an object from one to the otherarrow_forward4. Fast in java coding please. Thank you File Encryption is the science of writing contents of a file in a secret code. Yourencryption program should work like a filter, reading the content of one file,modifying the data into a code, and then writing the coded contents out to a secondfile. The second file will be a version of the first file, but written in secretcode. Write a program to demonstrate the above working with binary files.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License