Home > Blockchain >  Touch .env Won't Work, Touch anything.js Does
Touch .env Won't Work, Touch anything.js Does

Time:06-30

The Title pretty much sums this issue up, I am trying to create an .env file on my deployed EC2 instance by running touch .env in the CLI for the deployment. The command returns no errors, indicating it created the file, but I cannot cd into it, and it does not appear when I run ls. It works totally fine if I try anything that isn't an .env file, so what gives?

CodePudding user response:

touch is for creating an empty file, or updating the access and modification times of an existing file.

cd is for changing to a directory. Don't try to cd into a file, because that is never going to work.

ls without -a does not show any files that start with a . character.

Try ls -a to see if the .env file exists.

  • Related