11.1. How to access the /proc-filesystem11.1.1. Using "cat" and "echo"Using "cat" and "echo" is the simplest way to access the /proc filesystem, but some requirements are needed for that
Normally, only entries in /proc/sys/* are writable, the others are readonly and for information retrieving only. 11.1.2. Using "sysctl"Using the "sysctl" program to access the kernel switches is a modern method today. You can use it also, if the /proc-filesystem isn't mounted. But you have only access to /proc/sys/*! The program "sysctl" is included in package "procps" (on Red Hat Linux systems).
11.1.2.1. Retrieving a valueThe value of an entry can be retrieved now:
11.1.2.2. Setting a valueA new value can be set (if entry is writable):
Note: Don't use spaces around the "=" on setting values. Also on multiple values per line, quote them like e.g.
11.1.3. Values found in /proc-filesystemsThere are several formats seen in /proc-filesystem:
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |