0830 Exercises:
1, summarize the text editing tool vim use method
2. Summary File Search command How to use Find
3. Summarize the content of bash environment variables
4, summarizes the special authority (SUID, SGID, Sticky) The knowledge point
5, summarize the Disk Management, file system related knowledge points and the use of related commands;
VIM Editor Exercises:
1. Copy the/etc/grub2.cfg file to the/tmp directory and use the Find and replace command to delete white space characters from the beginning of the file
:%s/^[[:space:]]\+//g
2. Copy the/etc/rc.d/init.d/functions to/tmp directory and use the Find and Replace command to add a # to the beginning of the line beginning with a white space character in the file;
:%s/^[[:space:]]/#&/g
3, replace the/etc/sysconfig/init in/tmp/functions file is/var/log;
:%[email protected]/etc/sysconfig/[email Protected]/var/[email protected]
4. Delete the line beginning with # in the/tmp/functions file with #, followed by at least one white space character #
:%s/^#[[:space:]]//g
The Find command exercises:
1. Find the main root of the/var directory and all files belonging to the group Mail
Find/var-user root-a-group Mail
2. Find all files that are not root, bin, or Hadoop under the/usr directory
find/etc/*-not-user Root! \ (-user root-o-user hadoop \)-ls
3. Find all files that have been modified and are not root or Hadoop for the most recent week in/etc directory
Find/etc-mtime-7-a-not \ (-user root-o-user hadoop \)
4. Find all files on the current system that are not owned by the master or group and have been visited in the last week
Find/\ (-nouser-o-nogroup \)-a-atime-7
5. Find all files that are larger than 20k in the/etc directory and are of normal file type
Find/etc-size +20k-a-type F
6. Find files with no write permission for all users in/etc directory
Find/etc-not-perm +222-ls
7. Find at least one class of users who do not have permission to execute files in/etc directory
Find/etc-not-perm-111-ls
8, look for/etc directory, all users have execute permissions, and other users have write permissions files.
find/etc/-perm-113-ls
SUID,SGID,sdicky exercises:
1, so that ordinary users can use/tmp/cat to view/etc/shadow files
chmod U+s/tmp/cat
2, create the directory/test/data, let a group of ordinary users have write permissions to it, and all the files created by the group is the directory belongs to the group, in addition, each user can only delete their own files
Mkdir-pv/test/data
chmod G+ws/test/data
0830 exercises: Vim, find, special permissions