我的问题是,我希望从root运行一个脚本,而我必须通过在命令行上键入"su -“来手动以root登录。
我的疑问是,我正在执行的脚本只需提示我输入密码,即可自动以root登录。救我!
:脚本:
if [ "$(whoami)" != "root" ]; then
echo -e '\E[41m'"\033[1mYou must be root to run this script\033[0m"
**su - # at this line I want to login as root but it is not wo
我正在写一个shell脚本,需要使用ftp下载补丁。有不同版本的补丁,但我想下载与模式*$ver_LINUX*或*$ver_Generic*匹配的补丁。下面的mget命令不允许我为此使用或(|)选项。谁能建议这是不是可以在ftp和如何。
ftp -inv $FTP <<EOF
quote USER $ftp_usr
quote PASS $ftp_pass
cd $patch
binary # for zip files.
ls # Just for check
mget *${ver}_LINUX.* # downloads patches like p111229_11202
我正在尝试使用nodes child_process模块在windows中执行一个命令。问题是有问题的应用程序(windows中的ftp命令行)会提示输入用户名和密码。我尝试通过以下方式向命令提供所要求的信息:
var ftp = spawn('ftp',['<<ip of server>>']);
var authenticated = false;
var commandsSended = false;
ftp.stdin.write("debug\n");
ftp.stdin.write(os.EOL);
ft
我想在我的ubuntu服务器14.04LTS上安装一个ARK服务器,我想我完全搞砸了我的系统。
我做的是这。
nano /etc/apt/sources.list
并将其添加到文件中。
# Experimental/unstable (sid) repositories
deb http://ftp.debian.org/debian experimental main
deb http://ftp.debian.org/debian sid main
然后:
apt-get update
apt-get install libc6-dev
但现在我已经失去了依赖。我试过所有标准的东西。
ap
将我的Linux服务器更新为Ubuntu19.10和Debian的最新版本,它们都指向我运行镜像存储库的主Linux服务器,并允许通过FTP与其通信,现在我正在接收消息
The method 'ftp' is unsupported and disabled by default.
Consider switching to http(s).
Set Dir::Bin::Methods::ftp to "ftp" to enable it again.
在无法获取ftp://之后。如何通过FTP重新启用系统更新的检索?