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| ?
|
What is the current value of \cpp|myvariable| ?
|
||||||
|
|
||||||
\begin{codebash}
|
\begin{codebash}
|
||||||
cat /sys/kernel/mymodule/myvariable
|
sudo cat /sys/kernel/mymodule/myvariable
|
||||||
\end{codebash}
|
\end{codebash}
|
||||||
|
|
||||||
Set the value of \cpp|myvariable| and check that it changed.
|
Set the value of \cpp|myvariable| and check that it changed.
|
||||||
|
|
||||||
\begin{codebash}
|
\begin{codebash}
|
||||||
echo "32" > /sys/kernel/mymodule/myvariable
|
echo "32" | sudo tee /sys/kernel/mymodule/myvariable
|
||||||
cat /sys/kernel/mymodule/myvariable
|
sudo cat /sys/kernel/mymodule/myvariable
|
||||||
\end{codebash}
|
\end{codebash}
|
||||||
|
|
||||||
Finally, remove the test module:
|
Finally, remove the test module:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user