title: Find to which container or image a docker AUFS diff folder belongs to
body: <p>Does anyone knows how to find to which docker container, image or volume an AUFS diff folder belongs?</p>
  
  <p>I have a legacy file like this</p>
  
  <p><code>/var/lib/docker/aufs/diff/d4f388f19d7b4e8e9eef2a4ae5630f87d59180263482fbc63dbe7d31b6c0fc5b/usr/lib/gcc/x86_64-linux-gnu/6/cc1</code></p>
  
  <p>There's no container, volume or image with this ID <code>d4f388f19d7b</code></p>
  
  <p>I tried to find it inspecting each container, volume and image using the ID <code>d4f388f19d7b</code> but no luck</p>
  
  <p><code>for c in $(docker ps -q) ; do docker inspect $c | grep d4f388f19d7b ; done</code><br>
  empty response</p>
  
  <p><code>for i in $(docker images -q) ; do docker image inspect $i | grep d4f388f19d7b ; done</code><br>
  empty response</p>
  
  <p><code>for v in $(docker volume ls -q) ; do docker volume inspect $v | grep d4f388f19d7b ; done</code><br>
  empty response</p>
  
  <p>Is there an easy way to identify which docker container/volume/image owns this file? <code>lsof</code> shows that the file is not in use as it's a legacy file last time accessed was 3 months ago.</p>
  
  <p>I am out of ideas</p>