PriyankaKotiyal mount 20130711-074459
Posted:
mount
Question
To write a program in python which will give the same output when we type /proc/mounts in the terminal
Solution
- Open the file /proc/mounts using the command open.The file will open in a r mode i.e the read mode.
- Read and print the file by print f.read() command.
- Close the file by f.close() command.
Execution
The program can be executed by the following commands:-
$ chmod +x mount.py
$ ./mount.py