3

I understand everything is a flat file in Linux. How hard is it to dump the contents of the main memory into a flat file? Does it already exist in Linux? If yes, what's the path to the file? What are the default permissions?

2 Answers 2

5

/dev/mem is probably what you are looking for, this file is manipulated like any other device file with dd and other utilities.

Permissions on my Debian linux system are:

crw-r----- 1 root kmem 1, 1 Aug 21 09:31 mem

0

kcore is (should be) an exact copy of what is running in memory.

cat /proc/kcore

should be readable by everyone.

2
  • On my system it's -r-------- 1 root root Commented Sep 12, 2011 at 13:22
  • 2
    It had better not be readable by anyone but root, since it allows snooping on the memory of every process. /proc/kcore on Linux is readable only by root. Also, /proc/kcore is the kernel's memory mapping; /dev/mem is the physical RAM. Commented Sep 13, 2011 at 6:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.