2 import os
, sys
, string
, subprocess
, socket
4 fields
= string
.split (sys
.stdin
.read (), '\x00')
6 while len (fields
) > 1:
7 opath
, atime
= fields
[0:2]
10 if not os
.path
.exists (opath
):
12 npath
= subprocess
.check_output (
13 "locate -b -l 1 -e '/%s$'" % opath
,
19 sys
.stdout
.write (opath
+ "\000" + npath
+ "\000")
20 elif os
.path
.isdir (opath
):
21 sys
.stdout
.write (opath
+ "\000\000")
24 socket
.fromfd (sys
.stdout
.fileno (),
26 socket
.SOCK_STREAM
).shutdown (socket
.SHUT_RDWR
)
27 sys
.stderr
.write ("gc.py done\n")