Assignment #1
10 points
Please answer the following questions:
1. You have just finished a 25-page paper that you have written using vi editor. The file containing the paper is called /assignments/data_sources. After your instructor has briefly looked at the paper, he recommends that you change all instances of the reference “data is” to “data are” before you submit it. What is the command to locate these references in the file for a quick assessment of how much you have to change?
Answer:/data are (0.5)
2.You are using thegrep command, but it is only searching through files in your immediate home directory. What option enables you to search through subdirectories below your home directory?
Answer:grep -r (0.5)
3. Each time you list the files in your home directory, the output scrolls by so fast you can’t read it. What would be the command(s) that would enable you to view the output one screen at a time?
Answer:ls -l | XXXX (X.X)
X. When you enter the XXXXXXXXXXX XXXXX /XXXX/Linux_features | head, XXXX is the maximum XXXXXX of XXXXX XXXX will be XXXXXXXXX?
XXXXXX:10 lines (0.5)
X.XXXX XX the general format XXX using the pipe operator?
Answer:command_1 | command_2 | command_3 | .... | command_N (X.5)
X. XXXX is XXX XXXXXXX to find the instances in which the XXXX “XXXX” XX used in the /etc XXXXXXXXX.
XXXXXX:grep -r XXXX XXX(0.X)
X. XXXX is the XXXXXXX to XXXX out which XXXXX in the my_list XXXX XXXXXXX XXX XXXX “XXXX”.
XXXXXX:XXXX -n XXXX XXXXXXX(X.X)
8.Create a file XXXXXX XXXXX, containing the following individual lines:
Oak tree
XXXX XXXX
Spruce tree
XXXXXXXXXX
XXXXX tree
XXX XXX vi editor XX XXXXXX a XXXX called more_trees XXX copy in the contents XX XXX trees file (XX XXX first line XX blank, delete it). XXXX, add the XXXXXXXXX trees XX XXX XXX XX the XXXX.
Redwood
Willow XXXX
XXXX XX XXX command XX XXXXXXX the XXXXX XXX more_trees XXXXX and show XXX differences in XXXXX of XXXXXXXXXX XXXXX that XXXXXX? Submit XXXX XXXXX XXX a screenshot after you XXXXXXXX the command.
Answer:diff trees XXXXXXXXXX
Images Not Shown (0.X)
9. XXXX a XXXXXXX to compare the XXXXXXXXXXX XXXXXXX XXXXX XXXXX (XXXXX file2 file3) XXX that XXXXXXX XXXXXX XXX individual lines.
Answer:XXXX XXXXX file2 XXXXX (X.5)
10. XXXX international company XX scheduling a meeting among managers in XXXXXX, XXX XXXXXX XXXXXX, XXXXX, XXXXXX, XXX Hong Kong on XXX XXXXX of Greenwich XXXX XXXX (XXX). XXXX XXXXXXX XXXXXXX you to display the current time in XXX?
Answer:date – u (0.5)
XX. It’s late and you have XXXX working all XXX XX finish a report. Before you go home you want XX XXXX XXXX report XXXX rpt1. The copy of XXXX XXXXXX file XX in XXX same directory XXX XXX name of XXXX XXXX XX XXXXXXXXX. XXXX copy command should you use XX XXXXXX that you XXX’t XXXXXXXXXXXXX copy an older XXXXXX file XXXX XXX newer report file you’ve XXXX XXXXXXX XX for the last four hours?
XXXXXX:cp -u rpt1 XXXXXXXXX (0.X)
XX. Your XXXX XXXXX to XXX the XXXXXXX XX XXXX hidden XXXXX and also XXXXX to know how XX XXXX XXXX among other files. XXXX XX you XXXX her?
Answer:ls -la(0.5)
13. XXX XXXX many files XXXX XXXXX XXXX XXX XXXX “XXXXXXX” and that XXX XXXX two digits to designate a XXXX, XXXX XX account00, XXXXXXX 01, XXX so XX. What XX the XXXXXXX that XXXXXXX you to view XXX XX these XXXXX XXXX start XXXX account XXX XXXX end XXXX XXX XXXXXX?
Answer:ls XXXXXXX??
(X.5)
14. XXXXXXX XXX XXXXXXXXX tasks.XXXXXXX screen XXXXX in XXXX answer.
Make a XXXXXXXXX XXXXX your home directory called XXXXXXXXX. Next XXXX a XXXXXXXXX under the documents XXXXXXXXX called XXXXXXXXXXXX. What XX the absolute XXXX XXX the spreadsheets XXXXXXXXX?
Images Not Shown (0.XX)
What is the absolute XXXX XXX XXX spreadsheets XXXXXXXXX?
(Images Not Shown0.XX)
Use XXX XXX command to XXXXXX a two-line XXXX in XXXX XXXX XXXXXXXXX XXXXXX datainfo. On XXX first line XXXXX XXX and on the second XXXX enter 288. After XXX XXXX XX created, copy it from XXXX home directory to the spreadsheets directory you created.
XXXX XXXXXXXX did you XXX?
Images Not Shown
(0.X)
Append the XXXXXXX month’s calendar to XXX XXXXXXXX XXXX XXXX is in XXXX home directory. Next copy XXXX changed datainfo file XXXX XXX XXXXX XXXXXXXX file in the XXXXXXXXXXXX directory, XXX XXX XXX XXXX XXXXXX that prompts you XXXXXX you XXXXXXXXX XXX file in XXX XXXXXXXXXXXX XXXXXXXXX. XXXXX the XXXXXXXX XX XXX datainfo file in the spreadsheets directory XX XXXX certain XXXX XXXX was successful.
What XXXXXXXX XXX you use?
Images Not Shown
Make the spreadsheets directory XXXX XXXXXXX XXXXXXXXX. XXXX copies XX XXX XXXXXXXX file in XXX spreadsheets XXXXXXXXX, so that XXX copy is named myinfo XXX one XX named XXXXXXXX. Next, use a wildcard character to list all XXXXX that start with “XXXX.” Use a XXXXXXXX XXXXXXXXX XX XXXX all XXXXX XXXX XXX XXXX “info.” Use a wildcard character XXXXXXXXXXX XX list all XXXXX XXXX XXXX “ata” as XXX second, XXXXX, XXX XXXXXX characters.
What commands did you XXX?
Images Not Shown
(0.X)
15.XXXXX XXX XXX commands to accomplish XXXX (XXX the screen XXXXX). Submit also XXX the files you have created.
X)XXXX XXXX home XXXXXXXXX create XXX directory called assignment1
mkdir assignment1
Images Not Shown
X) XXXXXX directory XX XXXXXXXXXXX
XX XXXXXXXXXXX
Images Not Shown
C)XXXX is XXXX XXXXXXX XXXXXXX directory?
/XXXX/students5/129/yusoof/assignment1
Images Not Shown
X)XXXXXX a file called sys.info and insert XXXX XXXX file all XXXXXXXXXXX XXXXX your system.
What XX the command?
XXXX &XX; sys.XXXX
Images Not Shown
E)XXXXXX to XXX sys.XXXX file XXXXXXX date.
XXXX is the XXXXXXX?
XXXX &XX;&XX; XXX.info
Images Not Shown
X)Append to XXX file XXX.XXXX the XXXXX of the users currently logged in, together with their XXXXXXXX device XXXXXXX, the times XXXX logged in.
XXXX is XXX command?
who >> XXX.info
Images Not Shown
G)XXXXXX XXX XXXX login in XXX.info XXX XXXXXX it XX a new file (XXX XXXX login XXXX XXX the XXXX XXXX).
XXXX is XXX XXXXXXX?
cat XXX.XXXX | grep XXXXXX >> yusoof
Images Not Shown
H)Combine the content XX XXXXX XXXXX XXXX a XXX file (XXX.file) using XXX XXXXXXX.
XXXX is XXX XXXXXXX?
cat XXX.info yusoof &XX; new.file
Images Not Shown
I)Count how XXXX XXXXX 2015 XXXXXXX in XXX new.file XXXXX one command.
What XX XXX XXXXXXX?
cat XXX.XXXX | grep -c XXXX
Images Not Shown
X)Show XXXXX XXXX differ between sys.XXXX and new.file.
What XX XXX command?
diff new.XXXX XXX.XXXX
Images Not Shown
(X)
3 files + screen shots =X.X
">