
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Hint: List of commands to read and use: cd, pwd, ls, echo, cat, od, quoting character and output redirection operator.
- Change your working directory to your login directory.
- A new file can be created in 4 different ways: (i) vi, (ii) touch, (iii) cp, and (iv) cat command. You have used touch and cp commands before. In this question, you will use cat command. In part II, you will use the vi text editor.
- Create a short file using cat command and output redirection operator > like
cat > filename. The content of the file must be typed from the keyboard, which is the default standard input (stdin) device. End the input to the file by typing Ctrl d keys at the same time.
- Copy the file you have created to a new file.
- Display the content of the file you have created using one od command with appropriate option(s) for each question below:
- Display in character form
- Display in hexadecimal form
- Display in octal form
- Display in both character and octal form
- Using echo command, answer how the end of line (also called new line) character is displayed. NOTE: Shell gives special meaning to certain characters like *, ?, \ and others. To make shell not to give special meaning to that character, you have to put a \ in front of it. This is called quoting character. Therefore, you have to quote the character \ by putting a \ in front of it like \\ in order for the echo command to display it. Read more about it quoting character in your textbook. The end of line character is the representation of the “enter” key. The ASCII character code for the “enter” key is not a displayable single character like the letter ‘X’ for example. Hence, the system displays it differently.
- Using echo command, answer: (i) the ASCII number code for new line (enter key) and (ii) for any one letter in the file, display the letter and its ASCII number code. This can be done by comparing the output of the character form and the hexadecimal form above. NOTE: Do not forget to specify the number type.
- Search Internet for ASCII table and give the ASCII code for one letter, one special character, and one digit of your choice that are not in the file. You have to do this search on your laptop by running browser and going to site like google.com
In your answer, specify whether the number is decimal or octal or hexadecimal or binary.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- Please help me answer all questions. I will rate your answers. thank youarrow_forwardWhich Win32 function moves the file pointer to a specified offset in relation to the beginning of a file when called?arrow_forwardHow do you close a file that is no longer in use? Group of answer choices delete file; ~file; close(file); file.close();arrow_forward
- The character in column 1 should be either A or B and in the column 2 should be a digit. If both columns contain appropriate values then update is made. If the input of column 1 is incorrect, i.e. neither A nor B, then message X will be displayed. If the input in column 2 is incorrect, i.e. input is not a digit, then message Y will be displayed. A file must be updated, if the character in the first column is either "A" or "B" and in the second column it should be a digit. If the value in the first column is incorrect (the character is neither A nor B) then massage X will be displayed. If the value in the second column is incorrect (the character is not a digit) then massage Y will be displayed. Draw a Cause-Effect graph for the above situation and generate test cases through the corresponding decision table.arrow_forwardCreate a bash script to manage users. The script will take three script arguments: an input filename of users, a group name, and an operation flag. The input filename of users to manage will be a text file with a list of users to add to the system or remove from the system. Each line in the file will contain a User ID and an encrypted password, which are separated by a space character as a delimiter. Your input user file should have at least five users. You will need to encrypt your passwords via the command line using openssl and place the generated password in your input user file. Write a script that adds and removes users to a Linux system using the input file provided to the script. The users should be added to group provided in the script argument. You will want to check if the group already exists. Use an operation of -a to signify to add the users to the system and an operation of -r to signify removing the users from the system. When adding users, make sure you create the…arrow_forwardSummary.py: A student roster file roster1.dat has these fields: name, major, gpa, credits Write a file roster1.out with these new fields: major, avgGpa, avgCredits, count where avgGpa is the average GPA for students in that major, avgCredits is the average number of credits for students in that major, and count is the number of students in that major.arrow_forward
- You are given a String variable named file. It contains the name of a one-line file. Write a sequence of statements that make an exact copy of the file and give it the same name but with the string ".cpy" attached to the filename. Make sure that the data written to the file has been flushed from its buffer and that any system resources used during the course of running these statements have been released.(Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)arrow_forwardThe opendir() function opens a directory stream corresponding to the directory name, and returns a pointer to the directory stream. The stream is positioned at the first entry in the directory. Why does the openir() function not fetch fd as return value even though it is a system call?arrow_forwardwhat is Copy to Output Directory property ?arrow_forward
- If a file is set with the immutable flag, what security controls does this provide for the file?arrow_forward* Question Completion Status: QUESTION 11 Wite a program (mymv infile outfile) to rename a infile as outfile using file system calls, link(), and unlink() For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph Arial 10pt P. QUESTION 12 Write a program that takes the file name as the command line argument and outputs the size of the file in byte the file) !! !!!arrow_forwardWhen a user issues the following distinct commands, what happens and why? Assume all files exist. $ echo $?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY