.env commands for symlinks
Sat Apr 02 2022 08:51:08 GMT+0000 (Coordinated Universal Time)
Saved by
@ejfhnwouhqw
#shellscript
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
content_copyCOPY
Comments