Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- docker ps -q | xargs -I % sh -c 'docker exec % ls -l /home/alpine'
- # NOTE: /home/alpine is the directory we're listing
- # -I % means to replace the % character with what's coming out of the statement before the pipe
- # 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