无法从 Linux 上的 Azure Web App 中删除文件

问题描述 投票:0回答:1

我有几个托管在 Azure 中的 WordPress 网站,并在 Linux 上使用 Web 应用程序。我尝试对插件进行一些更新,当更新到达 AIOSEO Redirects 时,更新崩溃了,因为它无法删除插件 aioseo-redirects.php 的主文件。

我尝试了命令

mv aioseo-redirects.php aioseo-redirects.php.php

...然后它回来了...

mv: cannot stat 'aioseo-redirects.php': No such file or directory

任何帮助将不胜感激!

谢谢, 西普里安

linux wordpress azure
1个回答
0
投票

我在 Linux 上部署了一个 python 应用程序。

要运行命令,请通过 SSH 连接到应用程序 - 前往

Development tools -> SSH -> Go

**注意:**所有已部署的应用程序文件都将在

home\site\wwwroot
路径中可用。 您可以通过打开 kudu 控制台(SCM url)来检查所有文件
https://<appname>.scm..azurewebsites.net/newui

首先检查该文件在您尝试运行该文件的命令的目录中是否可用。

我正在目录中运行命令

home\site\wwwroot

要重命名文件或移动文件,请使用

mv
命令:

rename
:

mv <old_file_name> <new_file_name>
mv oldfile.txt newfile.txt   #my command

move file
:

mv <file_name> path/to/file
eg. mv oldfile.txt home/site #example

要删除/删除文件

rm
使用命令

remove file
:

rm <file_name>
rm newfile.txt  #my command

OUTPUT

© www.soinside.com 2019 - 2024. All rights reserved.