[Python-ideas] BetterWalk, a better and faster os.walk() for Python
Andrew Barnert
abarnert at yahoo.com
Fri Nov 23 06:59:40 CET 2012
From: Steven D'Aprano <steve at pearwood.info>
Sent: Thu, November 22, 2012 8:52:56 PM
>
> On 23/11/12 13:48, Andrew Barnert wrote:
> >> From: Robert Collins<robertc at robertcollins.net>
> >> Sent: Thu, November 22, 2012 4:26:49 PM
> >>
> >> If you want to test cold cache behaviour, see /proc/sys/vm/drop_caches
> >>
> >> -Rob
> >
> >
> > On a Mac? There's no /proc filesystem on OS X; that's linux-specific.
>
> I don't think that is correct. /proc is a UNIX feature, not just Linux.
To make it more clear:
The existence of /proc is a non-standardized feature that some, but not, all
UNIXes have—OS X is one of those that does not.
Almost all UNIX and UNIX-like systems that do have /proc have a directory per
process, with read-only binary information about those processes, and nothing
else.
The idea of writing to magic text files under /proc/sys to control the OS is
entirely specific to linux.
See https://blogs.oracle.com/eschrock/entry/the_power_of_proc for the Solaris
perspective,
and http://lists.freebsd.org/pipermail/freebsd-fs/2011-February/010760.html for
the FreeBSD perspective, to get an idea of how unique linux /proc is, and why
it's likely to stay that way.
> OS X is also a Unix. Since 10.5, OS X has been registered with the SUS
> ("Single UNIX Specification") and has received UNIX certification.
Yes, and SUS/POSIX/OpenGroup doesn't specify /proc/sys, or even basic /proc, or
epoll or /dev/cdrom or GNOME or half the other things you have on your Linux
box. OS X is a UNIX system, not a Linux system.
More information about the Python-ideas
mailing list