All pastes #428857 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-07 21:35 UTC
rendered paste body
Traceback (most recent call last):
  File "./dir_walker.py", line 8, in ?
    userid = os.stat(os.path.join(root,name))[ST_UID]
OSError: [Errno 2] No such file or directory: '/usr/share/doc/python-all-dev'


This is the script

!/usr/bin/python

import os, sys
from stat import *
from os.path import join
for root, dirs, files in os.walk(sys.argv[1]):
    for name in files:
        userid = os.stat(os.path.join(root,name))[ST_UID]
        groupid = os.stat(os.path.join(root,name))[ST_GID]
        if  userid != 0 or groupid != 0:
            print os.path.join(root,name), userid, groupid