0

I've tried /proc/meminfo but my permission has been denied.

closed as unclear what you're asking by G-Man, Anthon, X Tian, steve, don_crissti Oct 14 '15 at 20:55

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you please add the output of ls -l /proc/meminfo to your question? – Marco Oct 14 '15 at 15:44
  • 4
    You need to provide more information when asking questions. Assuming you mean Linux, you can run the 'free' command to see the total memory. – teppic Oct 14 '15 at 15:45
2

You need to use cat /proc/meminfo, not execute /proc/meminfo directly.

The reason you get "permission denied" is because you're trying to execute /proc/meminfo, and /proc/meminfo has no executable bit set (because it's not an executable, it's a file that you have to read).

Reading /proc/meminfo itself should not require any special permissions.

You might find it easier to find the total memory using the free command, though.

Not the answer you're looking for? Browse other questions tagged or ask your own question.