<div dir="ltr">ping?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 4:48 PM, enh <span dir="ltr"><<a href="mailto:enh@google.com" target="_blank">enh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8000001907349px">find: add -inum option</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">-inum is a commonly implemented extension to search by inode number.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Linux's fs-layer tracepoints log many events in terms of inodes, so</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">"find -inum" is useful for mapping those events back to specific files.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Signed-off-by: Greg Hackmann <</span><a href="mailto:ghackmann@google.com" style="font-size:12.8000001907349px" target="_blank">ghackmann@google.com</a><span style="font-size:12.8000001907349px">></span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">diff --git a/toys/posix/find.c b/toys/posix/find.c</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">index 69e370d..1e9bdfe 100644</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">--- a/toys/posix/find.c</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">+++ b/toys/posix/find.c</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">@@ -32,6 +32,7 @@</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> -ctime N created N days ago -mtime N modified N days ago</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> -newer FILE newer mtime than FILE -mindepth # at least # dirs down</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> -depth ignore contents of dir -maxdepth # at most # dirs down</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">+ -inum N inode number N</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> -type [bcdflps] (block, char, dir, file, symlink, pipe, socket)</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> Numbers N may be prefixed by a - (less than) or + (greater than):</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">@@ -341,6 +342,9 @@</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> test = compare_numsign(new->st.st_siz</span><span style="font-size:12.8000001907349px">e, 512, ss[1]);</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> } else if (!strcmp(s, "links")) {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> if (check) test = compare_numsign(new->st.st_nli</span><span style="font-size:12.8000001907349px">nk, 0, ss[1]);</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">+ } else if (!strcmp(s, "inum")) {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">+ if (check)</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">+ test = compare_numsign(new->st.st_ino</span><span style="font-size:12.8000001907349px">, 0, ss[1]);</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> } else if (!strcmp(s, "mindepth") || !strcmp(s, "maxdepth")) {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> if (check) {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> struct dirtree *dt = new;</span><div style="font-size:12.8000001907349px"></div><div><br></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Elliott Hughes - <a href="http://who/enh" target="_blank">http://who/enh</a> - <a href="http://jessies.org/~enh/" target="_blank">http://jessies.org/~enh/</a><br>Android native code/tools questions? Mail me/drop by/add me as a reviewer.</div>
</div>