<<< First unit exercises >>>
User Login System graphical interface with student
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/88/50/wKiom1fuVNujhVbFAAEDr2C_6i0936.png-wh_500x0-wm_3 -wmp_4-s_455971266.png "title=" 1png.png "alt=" Wkiom1fuvnujhvbfaaedr2c_6i0936.png-wh_50 "/>
Open the virtual machine client side
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/50/wKiom1fuVRrxyLVBAAUGDH6WbsM772.png-wh_500x0-wm_3 -wmp_4-s_2534838175.png "title=" 2.png "alt=" Wkiom1fuvrrxylvbaaugdh6wbsm772.png-wh_50 "/>
Graphical Client Side
2. Open a bash
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/4C/wKioL1fuVUXC-UbpAAKCToL1dNA998.png-wh_500x0-wm_3 -wmp_4-s_1325180441.png "title=" 3.png "alt=" Wkiol1fuvuxc-ubpaakctol1dna998.png-wh_50 "/>
3. Modify The student password to update the password to "T3st1ngtlme" ( host letters and Numbers )
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/88/4C/wKioL1fuVWqTlPOTAAE8H-qCJ9A285.png-wh_500x0-wm_3 -wmp_4-s_955947069.png "title=" 4.png "alt=" Wkiol1fuvwqtlpotaae8h-qcj9a285.png-wh_50 "/>
4. display the current system time
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/88/50/wKiom1fuVYKxtuA1AABWvcYVKR8210.png-wh_500x0-wm_3 -wmp_4-s_3459472647.png "title=" 5.png "alt=" Wkiom1fuvykxtua1aabwvcyvkr8210.png-wh_50 "/>
5. display the current system time, the display format is:" hours : minutes : seconds am/pm"(am/pm for the last afternoon logo)
Dat +%r
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/88/4C/wKioL1fuVaKygi6gAABJh8-nRac432.png-wh_500x0-wm_3 -wmp_4-s_1092368903.png "title=" 6.png "alt=" Wkiol1fuvakygi6gaabjh8-nrac432.png-wh_50 "/>
6. DisplayThefile type of "/usr/bin/clean-binary-files"
File/usr/bin/clean-binary-files
7. statistics for "/usr/bin/clean-binary-files" File size
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/88/4C/wKioL1fuVcqD22hPAABw4uJeN8A676.png-wh_500x0-wm_3 -wmp_4-s_2479467029.png "title=" 7.png "alt=" Wkiol1fuvcqd22hpaabw4ujen8a676.png-wh_50 "/>
8. use a shortcut to invoke the executed 4 command in the shell
! 4
9. use a shortcut to execute the most recent command with the "date" keyword
Ctl+r +date
<<< Second unit exercise >>>
1. create a file with commands and regular expressions as required
*) Use one command to create a westos_classx_linuxy ( the value range of X is 1-2andY is a range of 1-6)
*) These files are included in the study directory of the root user's desktop
*) Create 8 files with one command Redhat_versionx( The range of x is 1-8)
*) Redhat_virsionx These files are included in VERSION in the/mnt directory
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/50/wKiom1fuVeagYPpNAAHcNe54K0w159.png-wh_500x0-wm_3 -wmp_4-s_527551782.png "title=" 8.png "alt=" Wkiom1fuveagyppnaahcne54k0w159.png-wh_50 "/>
2. management of the documents just established by the letter is as follows
*) Copy the odd files in the Redhat_versionx to the single in the desktop with one command
*) copy files with even numbers in Redhat_versionx to /double with a single command
*) use a command to move the Class1 file in Westos_classx_linuxy to the CLASS1 of the current user's desktop
*) use a command to move the Class2 file in Westos_classx_linuxy to the CLASS2 of the current user's desktop
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/4C/wKioL1fuViqA7-jyAAHjGHvJw3M679.png-wh_500x0-wm_3 -wmp_4-s_418482843.png "title=" 9.png "alt=" wkiol1fuviqa7-jyaahjghvjw3m679.png-wh_50 "/>650" this.width=650; "src = "Http://s4.51cto.com/wyfs02/M02/88/50/wKiom1fuVk-i1531AAHhVmUar6A356.png-wh_500x0-wm_3-wmp_4-s_297260855.png" Title= "10.png" alt= "Wkiom1fuvk-i1531aahhvmuar6a356.png-wh_50"/>
3. back up all the files in the/etc directory with the names with numbers and end with. conf to the Confdir on the desktop
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/88/50/wKiom1fuVrrDjF6mAABF_WdnP4E863.png-wh_500x0-wm_3 -wmp_4-s_132666692.png "title=" 11.png "alt=" Wkiom1fuvrrdjf6maabf_wdnp4e863.png-wh_50 "/>
5. Delete all files you have just created or backed up
RM-RF *
<<< Fourth Unit exercise >>>
1. Execute the find/etc-name passwd command under the student user and manage its output requirements as follows:
* Show all correct output, mask error output
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/88/4C/wKioL1fuVtqjCP4WAABdLG-isPs453.png-wh_500x0-wm_3 -wmp_4-s_2371840152.png "title=" 12.png "alt=" Wkiol1fuvtqjcp4waabdlg-isps453.png-wh_50 "/>
* save correct number out to /mnt/find.out, error number out to /mnt/find.err
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/4C/wKioL1fuVvOApSsdAABwU91unK4666.png-wh_500x0-wm_3 -wmp_4-s_1964777472.png "title=" 13.png "alt=" Wkiol1fuvvoapssdaabwu91unk4666.png-wh_50 "/>
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/88/50/wKiom1fuVxTg5pPPAASta6dyqHE292.png-wh_500x0-wm_3 -wmp_4-s_3839017405.png "title=" 14.png "alt=" Wkiom1fuvxtg5pppaasta6dyqhe292.png-wh_50 "/>
* Create /mnt/find.all file, and save all output to this file
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/88/4C/wKioL1fuVzvQWPi2AACTDiJYjJY667.png-wh_500x0-wm_3 -wmp_4-s_2600270991.png "title=" 15.png "alt=" Wkiol1fuvzvqwpi2aactdijyjjy667.png-wh_50 "/>
* Save all output to /mnt/find.all again , and keep the contents of the source file
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/88/50/wKiom1fuV0-DV_XKAACMuaSbuEs515.png-wh_500x0-wm_3 -wmp_4-s_1235714678.png "title=" 16.png "alt=" Wkiom1fuv0-dv_xkaacmuasbues515.png-wh_50 "/>
* block all output from this command
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/88/50/wKiom1fuV6KgcSxMAAA8_u1V7IE446.png-wh_500x0-wm_3 -wmp_4-s_2141352394.png "title=" 17.png "alt=" Wkiom1fuv6kgcsxmaaa8_u1v7ie446.png-wh_50 "/>
* Show all output of this command and save output to any file on the desktop
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/88/4C/wKioL1fuV8qCXl3NAABu0uuGOC0583.png-wh_500x0-wm_3 -wmp_4-s_2608373739.png "title=" 18.png "alt=" Wkiol1fuv8qcxl3naabu0uugoc0583.png-wh_50 "/>
* save correct output to /mnt/find.out.1 , mask error Output
Find/etc–name passwd >/mnt/file.out.1 2>/dev/null
2. processing documents in document /usr/share/mime/packages/freedesktop.org.xml requirements are as follows:
* Locate the line containing ICH in this file and save these lines to /root/lines
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/88/50/wKiom1fuV_LS32JkAAG33jPb3zA434.png-wh_500x0-wm_3 -wmp_4-s_1571197933.png "title=" 19.png "alt=" Wkiom1fuv_ls32jkaag33jpb3za434.png-wh_50 "/>
* Replace the space in/root/lines with vim , but keep the contents of the file
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/88/4C/wKioL1fuWDOT5Nb2AAApq061VSQ794.png-wh_500x0-wm_3 -wmp_4-s_2116680917.png "title=" 20.png "alt=" Wkiol1fuwdot5nb2aaapq061vsq794.png-wh_50 "/>
%s//vim/g/
This article is from the "12116441" blog, please be sure to keep this source http://12126441.blog.51cto.com/12116441/1858211
Linux Exercises and Answers