Merge pull request #263 from pao0626/command-permission-changes

Add sudo for file access permissions
This commit is contained in:
Jim Huang 2024-07-03 17:04:14 +08:00 committed by GitHub
commit 7bcc4fbf46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1346,14 +1346,14 @@ sudo lsmod | grep hello_sysfs
What is the current value of \cpp|myvariable| ?
\begin{codebash}
cat /sys/kernel/mymodule/myvariable
sudo cat /sys/kernel/mymodule/myvariable
\end{codebash}
Set the value of \cpp|myvariable| and check that it changed.
\begin{codebash}
echo "32" > /sys/kernel/mymodule/myvariable
cat /sys/kernel/mymodule/myvariable
echo "32" | sudo tee /sys/kernel/mymodule/myvariable
sudo cat /sys/kernel/mymodule/myvariable
\end{codebash}
Finally, remove the test module: