mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 11:13:51 +08:00
Merge pull request #263 from pao0626/command-permission-changes
Add sudo for file access permissions
This commit is contained in:
commit
7bcc4fbf46
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user