From a9013104bac95e51c4d6af13f2e19f90657b77a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20G=C3=B6rner?= <5477952+MaxG87@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:31:27 +0200 Subject: [PATCH] Use tee to redirect content to root file Previously, a plain `>` redirect was used. However, that does not work if the user cannot write to the destination. Since a redirect is a separate process, prepending `sudo` does not help neither, as it would only affect `echo`. The appropriate solution under GNU/Linux is to use `tee`. This is what is done here. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f59026..b78a393 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,11 @@ Check the currently loaded module using `lsmod`. If you see `rtw88_core`, `rtw88_usb`, or any name beginning with `rtw88_` then you are using the RTW88 driver. If you see `88x2bu` then you are using this RTW88x2BU driver. -To blacklist RTW88 8822bu USB driver, run the following command: +To blacklist RTW88 8822bu USB driver, run the following command. It will +_replace_ the existing `*.conf` file with the `echo`ed content. ``` -echo "blacklist rtw88_8822bu" > /etc/modprobe.d/rtw8822bu.conf +echo "blacklist rtw88_8822bu" | sudo tee /etc/modprobe.d/rtw8822bu.conf ``` Then reboot your system.