Osiemnaste_21

 0    21 flashcards    michalesq
In chơi tự kiểm tra
 
câu hỏi - câu trả lời -
list all available contexts existing in the system and files associated with them
bắt đầu học
semanage fcontext -l
list all available contexts existing in the system and files associated with them optional, any subdirectory coming after / has the same contenx as parent directory in SELinux
bắt đầu học
(/.*)?
restore context of the parent directory to the content
bắt đầu học
restorecon index. html
which file has to exist to relabel files in the system
bắt đầu học
/.autorelabel
How to apply context to the firectory?
bắt đầu học
semanage fcontex -a -t <context_t> '<directory(/.*)?>'
restoring content recursively, verbosely
bắt đầu học
restorecon -Rv /content
How to remove context?
bắt đầu học
seamange fcontex -d "<directory(/.*)?>"
display boolean values
bắt đầu học
getsebool -a / semanage boolean -t
enables homedirs in SELinux (not persistent)
bắt đầu học
setsebool httpd_enable_homedirs on
enables homedirs in SELinux (persistent)
bắt đầu học
setsebool -P httpd_enable_homedirs
How to install troubleshooter for selinux?
bắt đầu học
yum install setroubleshoot-server
which file contains information about SELinux violations?
bắt đầu học
/var/log/audit/audit.log
How to run troubleshooter?
bắt đầu học
sealert -a /var/log/audit/audit. log
" Replaces one with unos in a case-insensitive manner, so it will print ""unos TWO"""
bắt đầu học
echo ONE TWO | sed "s/one/unos/I"
A way to replace dos2unix:)
bắt đầu học
sed 'G; G' file. txt
Delete all spaces in front of every line of file. txt
bắt đầu học
sed 's/^[^t]*//' file. txt
Delete all spaces at the end of every line of file. txt
bắt đầu học
sed 's/[^t]*$//' file. txt
Delete all spaces in front and at the end of every line of file. txt
bắt đầu học
sed 's/^[^t]*//; s/[^]*$//' file. txt
Replace foo with bar only for the first instance in a line.
bắt đầu học
sed 's/foo/bar/' file. txt
Replace foo with bar only for the 4th instance in a line."
bắt đầu học
sed 's/foo/bar/4' file. txt
Replace foo with bar for all instances in a line.
bắt đầu học
sed 's/foo/bar/g' file. txt

Bạn phải đăng nhập để đăng bình luận.