1, summarize the text editing tool vim use method;
2, summarize the document Search command find use method;
3, summarize the content of bash environment variable;
4. Summarize the knowledge points of special permissions (SUID, SGID, Sticky) on Linux file system;
5, summarize the Linux Disk Management, file system related knowledge points and the use of related commands;
6, copy the/etc/grub.cfg configuration file to the/tmp directory, use the Find replacement command to delete the/tmp/grub.cfg file at the beginning of the blank character;
%s/^[[:space:]]*//
7. Copy the/etc/rc.d/init.d/functions file to the/tmp directory, and add a # to the beginning of the line beginning with a blank character for each line of/tmp/functions with the find replacement command; The original whitespace character is reserved;
%s/^\ ([[: Space:]]\)/#\1/
8, replace the/etc/sysconfig/init in/tmp/functions file is/var/log;
%[email protected]/etc/sysconfig/[email protected]/var/[email protected]
9. Delete the beginning of the line in the/tmp/functions file so #, and # followed by at least one blank character #;
%[email protected]^#\ ([[: space:]]\+\) @\[email protected]
10, find the/var directory is the owner of the root, and belong to the group mail all files;
Find/var \ (-user root-a-group mail \)
11. Find all files that are not root, bin or hadoop under the/usr directory;
Find/usr! \ (-user root-o-user bin-o-user hadoop \)
12. Find all files whose contents have been modified and are not root or Hadoop for the last week in/etc directory;
Find/etc-mtime-7! \ (-user root-o-user hadoop \)
13. 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/-atime-7 \ (-nouser-o-nogroup \)
14. Find all files of more than 20k and type common in/etc directory;
find/etc/-size +20k-type F
15, look for all the users in/etc directory do not have permission to write files;
find/etc/! \ (-perm/222 \)
16. Find at least one class of users who do not have permission to execute files in/etc directory;
Method one: find/etc \ (!-perm/001-o!-perm/010-o!-perm/100 \)
Method Two: Find/etc! -perm-111
17, find/etc/init.d directory, all users have execute permission, and other users have write permission files;
find/etc/init.d/-perm-111-a-perm-002
18, so that ordinary users can use/tmp/cat to view/etc/shadow files;
chmod U+s/tmp/cat
19, create the directory/test/data, let a group of ordinary users have write permission to it, and all the files created by the group of directories belong to the group, in addition, each user can only delete their own files;
Mkdir/test/data New Directory
Usermod-a-G datagroup username append the data directory to the user's group to a user
chmod g+s,o+t/test/data plus SGID and sticky permissions
This article from "Yang Aerospace" blog, reproduced please contact the author!
August 30, 2015 jobs