1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 21:42:08 +02:00
tldr/pages/linux/fixfiles.md
K.B.Dharun Krishna 2135714193
pages/*, style-guide: update contents, fix Markdown (#10492)
* pages/*, style-guide: update pages, fix Markdown (commit 1)

* Update pages

* style-guide.de: update page

* Apply suggestions from code review

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* pip3: remove search command

* rpm: update path placeholder

Co-authored-by: pixel <pixel+github@chrissx.de>

* Update pages/linux/pkgfile.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

---------

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: pixel <pixel+github@chrissx.de>
2023-08-26 23:00:06 +05:30

1.2 KiB

fixfiles

Fix file SELinux security contexts. More information: https://manned.org/fixfiles.

  • If specified with onboot, this fixfiles will record the current date in the /.autorelabel file, so that it can be used later to speed up labeling. If used with restore, the restore will only affect files that were modified today:

fixfiles -B

  • [F]orce reset of context to match file_context for customizable files:

fixfiles -F

  • Clear /tmp directory without confirmation:

fixfiles -f

  • Use the [R]pm database to discover all files within specific packages and restore the file contexts:

fixfiles -R {{rpm_package1,rpm_package2 ...}}

  • Run a diff on the PREVIOUS_FILECONTEXT file to the [C]urrently installed one, and restore the context of all affected files:

fixfiles -C PREVIOUS_FILECONTEXT

  • Only act on files created after a specific date which will be passed to find --newermt command:

fixfiles -N {{YYYY-MM-DD HH:MM}}

  • Bind [M]ount filesystems before relabeling them, this allows fixing the context of files or directories that have been mounted over:

fixfiles -M

  • Modify [v]erbosity from progress to verbose and run restorecon with -v instead of -p:

fixfiles -v