触摸.env会赢得工作,触摸任何东西。

发布于 2025-02-11 17:06:34 字数 181 浏览 0 评论 0原文

标题几乎总结了这个问题,我试图通过在CLI中运行touch .env在部署的EC2实例上创建.ENV文件。该命令返回没有错误,表明它创建了文件,但是我不能cd中,并且当我运行ls时不会出现。 如果我尝试任何不是.env文件的东西,那就可以了,那么什么给出了?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2025-02-18 17:06:35

touch用于创建空文件,或更新现有文件的访问和修改时间。

CD用于更改为目录。不要尝试将CD进入文件,因为这永远无法使用。

ls没有-a没有显示以字符开头的任何文件。

尝试LS -A查看是否存在.env文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文