简体   繁体   中英

Touch .env Won't Work, Touch anything.js Does

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM