Osiemnaste_21

 0    21 informačný list    michalesq
vytlačiť hrať Skontrolujte sa
 
otázka - Odpoveď -
list all available contexts existing in the system and files associated with them
začať sa učiť
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
začať sa učiť
(/.*)?
restore context of the parent directory to the content
začať sa učiť
restorecon index. html
which file has to exist to relabel files in the system
začať sa učiť
/.autorelabel
How to apply context to the firectory?
začať sa učiť
semanage fcontex -a -t <context_t> '<directory(/.*)?>'
restoring content recursively, verbosely
začať sa učiť
restorecon -Rv /content
How to remove context?
začať sa učiť
seamange fcontex -d "<directory(/.*)?>"
display boolean values
začať sa učiť
getsebool -a / semanage boolean -t
enables homedirs in SELinux (not persistent)
začať sa učiť
setsebool httpd_enable_homedirs on
enables homedirs in SELinux (persistent)
začať sa učiť
setsebool -P httpd_enable_homedirs
How to install troubleshooter for selinux?
začať sa učiť
yum install setroubleshoot-server
which file contains information about SELinux violations?
začať sa učiť
/var/log/audit/audit.log
How to run troubleshooter?
začať sa učiť
sealert -a /var/log/audit/audit. log
" Replaces one with unos in a case-insensitive manner, so it will print ""unos TWO"""
začať sa učiť
echo ONE TWO | sed "s/one/unos/I"
A way to replace dos2unix:)
začať sa učiť
sed 'G; G' file. txt
Delete all spaces in front of every line of file. txt
začať sa učiť
sed 's/^[^t]*//' file. txt
Delete all spaces at the end of every line of file. txt
začať sa učiť
sed 's/[^t]*$//' file. txt
Delete all spaces in front and at the end of every line of file. txt
začať sa učiť
sed 's/^[^t]*//; s/[^]*$//' file. txt
Replace foo with bar only for the first instance in a line.
začať sa učiť
sed 's/foo/bar/' file. txt
Replace foo with bar only for the 4th instance in a line."
začať sa učiť
sed 's/foo/bar/4' file. txt
Replace foo with bar for all instances in a line.
začať sa učiť
sed 's/foo/bar/g' file. txt

Ak chcete pridať komentár, musíte byť prihlásený.