LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   /proc/ folder has empty files. (https://www.linuxquestions.org/questions/debian-26/proc-folder-has-empty-files-626369/)

deepumnit 03-07-2008 05:09 AM

/proc/ folder has empty files.
 
Dear all,

I have to do an assignment using the files in the /proc/ directory. But the thing is, the files - /proc/cpuinfo, process ID file - are all empty. I am running Debian 'etch'. I have checked the folder on other OSs, and have found that they are not empty. I have opened these files as SuperUser too, but the result is the same. I am confused. Why do not the files show any data, when they are supposed to?

Even the process ID folders have blank files.

Need help on this.

druuna 03-07-2008 05:44 AM

Hi,

How did you check the content of, for instance, /proc/cpuinfo?

Looking at the listing, it looks empty:
Code:

$ ls -l /proc/cpuinfo
-r--r--r--  1 root root 0 Mar  7 12:41 /proc/cpuinfo

If you cat the file, there is content:
Code:

$ cat /proc/cpuinfo
processor      : 0
vendor_id      : GenuineIntel
cpu family      : 15
model          : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz        : 2793.527
cache size      : 512 KB
physical id    : 0
.
.
.
.

The /proc directory can be seen as a realtime gateway/interface between the kernel and the user. See man proc for details about this pseudo filesystem.

Hope this helps.

Dutch Master 03-07-2008 06:56 AM

Well, obviously we're not going to do your assignment for you ;) But I suggest to study pipes and redirecting for/in scripts etc :)

deepumnit 03-07-2008 09:21 AM

Hi,

Thanks all. It did help.


All times are GMT -5. The time now is 01:33 AM.