.. link: http://dgplug.org/summertraining/2013/posts/priyankakotiyal-mount-20130711-074459.html .. description: .. tags: .. date: 2013/07/11 07:45:00 .. title: PriyankaKotiyal mount 20130711-074459 .. slug: priyankakotiyal-mount-20130711-074459 mount ------ Question --------- To write a program in python which will give the same output when we type /proc/mounts in the terminal Solution ---------- 1. Open the file /proc/mounts using the command open.The file will open in a r mode i.e the read mode. 2. Read and print the file by print f.read() command. 3. Close the file by f.close() command. Code ----- The program code is given here - `Link for the program's code`_ .. _Link for the program's code: https://github.com/PriyankaKotiyal/tasks_dgplug/blob/7494afbeaa275b6988c2e2f8a786303ad9a8126a/mount/mount.py Execution ---------- The program can be executed by the following commands:- $ chmod +x mount.py $ ./mount.py