Bird t-LINUX books of essays and homework Chapter VI.

This chapter learned related operations files and directories management.

Such as cp, mv, rm, etc., but also learned a hidden attribute lsattr and chattr, the hidden attribute is quite interesting, i added properties to make a file can not be found, renamed, set the link.

There are a sign of the Zodiac, this will only increase the data file, you can not delete the data can not be modified.

When you can not modify, delete files, you can view the hidden attribute of the file.

SUID, SGID, SBIT, relatively speaking, I practice the relevant folder SGID impression.

SGID new file folder below, the same packet of the packet belongs with the main file belongs folders.

SBIT also more interesting, the last attribute of the file is t, this document, the directory when the user has a W, X permissions, you have permission to write.

When creating a file or directory and then the user directory, only the output file and root themselves have the power .

Find files are generally used whereis or locate, by specifying the file or look inside the database, this will be faster

Certain conditions can find find super

find / -perm

6000 is just as SUID and SGID permissions

-6000 permissions least SUID and SGID

/ 6000 permissions SUID or SGID only have a

Simple question part:

1 / absolute path beginning, when a relative path beginning

2, mv / home / test / home / test2 can change test test2

3, PATH environment as I understand it, when you re-enter a command terminal, and then there are the environment can be performed, each user's PATH environment is different.

4, umask major again when a new file or folder when the default settings of the file attributes, without the user umask default, root has to 0022, the average user is 0002.

5, SUID permission only valid binary program executed by the program having executable permissions for an x, the permission is valid only in the process of the present program, the program execution will have owner rights.

6. Check with ll -d traditional privileges, file view the file type, lsattr view hidden attributes.

7, find / -perm -4000 or find / -perm 4000 can view the files with the SUID

8, find / etc / -size + 50k -a -size -60k -exec ls -l {} \; lookup / etc following documents less than 60k of greater than 50k

9, find / etc / -size + 50k -a -user root -exec ls -l {} \;! Find / etc 50k is greater than the following do not belong to the user's root file

10, find / etc / -size + 1500k -o -size 0 -exec ls -ld {} \; lookup / etc following file is greater than or equal to 0 1500k

 find /etc/ -size 0 -or -size +1500k -exec ls -ldh {} \;

The conditions of my computer fails, forgot to inform the master. Finding relevant information online.

 

Guess you like

Origin www.cnblogs.com/sidianok/p/11666906.html