Guest User

Untitled

a guest
Jul 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. docker ps -q | xargs -I % sh -c 'docker exec % ls -l /home/alpine'
  2.  
  3. # NOTE: /home/alpine is the directory we're listing
  4. # -I % means to replace the % character with what's coming out of the statement before the pipe
  5. # In my case, I'm only running a single container, so this works. Need to test with multiple running containers
Add Comment
Please, Sign In to add comment