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

  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

Execution

The program can be executed by the following commands:-

$ chmod +x mount.py

$ ./mount.py

Contents © 2013 dgplug - Powered by Nikola
Share
UA-42392315-1