this command puts a symlink of .env in every docker-compose folder it creates an extra .env with a ~ like .env~ if the file already exists. Just ignore it. I could create a line of code that removes it find /mnt/docker/docker-compose-files/ -mindepth 1 -maxdepth 1 -type d -exec ln -sbf /mnt/docker/docker-compose-config/.env {}/.env \; remove every .env~ file in every docker-compose folder find /mnt/docker/docker-compose-files/ -mindepth 1 -maxdepth 1 -type d -exec rm {}/.env~ \; create a symbolic link in one specified directory ln -sbf /mnt/docker/docker-compose-config/.env /mnt/docker/docker-compose-files/mongodb/.env find the .env file in specified directory find /mnt/docker/docker-compose-files -name .env
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter