Last login: Fri Jun 9 19:14:22 2023 from 61.142.114.74 root@iZwz9h5tizjqqur6xbkjylZ:~# cd /www/wwwroot/back-end/college-system-test root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# ll total 18659188 drwxr-xr-x 3 root root 4096 Apr 7 23:54 ./ drwxr-xr-x 4 root root 4096 Oct 8 2022 ../ -rw-r--r-- 1 root root 89138879 Apr 23 11:04 college-system-0.0.2-SNAPSHOT.jar drwxr-xr-x 2 root root 24576 Jun 9 01:43 logs/ -rw------- 1 root root 19017822424 Jun 9 18:42 nohup.out root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# ^C root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# 下步该干嘛
时间: 2024-04-03 22:31:46 浏览: 79
根据你提供的信息,你当前位于 Linux 系统中 college-system-test 目录下,该目录下有一个名为 college-system-0.0.2-SNAPSHOT.jar 的 jar 包。同时,还有一个名为 logs 的目录,以及一个名为 nohup.out 的文件。
如果你想运行 jar 包,可以使用如下命令:
```
java -jar college-system-0.0.2-SNAPSHOT.jar
```
如果你想在后台运行该 jar 包,可以使用 nohup 命令:
```
nohup java -jar college-system-0.0.2-SNAPSHOT.jar > /dev/null 2>&1 &
```
这样就可以在后台运行该 jar 包,并将所有输出重定向到 /dev/null。同时,该命令还会将该进程放入后台运行,并且不会随着当前终端窗口的关闭而结束。
相关问题
Last login: Fri Jun 9 21:31:25 2023 from 61.142.114.74 root@iZwz9h5tizjqqur6xbkjylZ:~# scp D:\new3\newuniversityguidance-master\target\college-system-0.0.2-SNAPSHOT.jar root@47.106.187.227:/www/wwwroot/back-end/college-system-test/ ssh: Could not resolve hostname d: Temporary failure in name resolution root@iZwz9h5tizjqqur6xbkjylZ:~# 哪里错了
在这个命令中,你试图将本地计算机上的文件 D:\new3\newuniversityguidance-master\target\college-system-0.0.2-SNAPSHOT.jar 复制到远程服务器 47.106.187.227 上的 /www/wwwroot/back-end/college-system-test/ 目录中。然而,由于你在本地的路径中使用了 Windows 风格的文件路径分隔符 "\",而在 Linux 系统中,文件路径分隔符应该是 "/"。另外,看起来你使用了错误的语法,应该在你的本地计算机上执行此命令,而不是在远程服务器上执行。正确的命令应该是:
```
scp D:/new3/newuniversityguidance-master/target/college-system-0.0.2-SNAPSHOT.jar root@47.106.187.227:/www/wwwroot/back-end/college-system-test/
```
请确保你已经使用正确的语法,并且在本地计算机上执行此命令。
Last login: Fri Jun 9 19:16:34 2023 from 61.142.114.74 root@iZwz9h5tizjqqur6xbkjylZ:~# cd /www/wwwroot/back-end/college-system-test root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# ll total 18659188 drwxr-xr-x 3 root root 4096 Apr 7 23:54 ./ drwxr-xr-x 4 root root 4096 Oct 8 2022 ../ -rw-r--r-- 1 root root 89138879 Apr 23 11:04 college-system-0.0.2-SNAPSHOT.jar drwxr-xr-x 2 root root 24576 Jun 9 01:43 logs/ -rw------- 1 root root 19017822424 Jun 9 18:42 nohup.out root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# ps -aux | grep college-system-0.0.2-SNAPSHOT.jar root 8469 0.0 0.0 14436 1044 pts/0 S+ 19:37 0:00 grep --color=auto college-system-0.0.2-SNAPSHOT.jar root 18653 0.1 19.7 4611772 1581456 ? Sl Apr23 122:02 java -jar college-system-0.0.2-SNAPSHOT.jar root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# nohup java-jar college-system-0.0.2-SNAPSHOT.jar nohup: ignoring input and appending output to 'nohup.out' nohup: failed to run command 'java-jar': No such file or directory root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# nohup java -jar college-system-.0.0.2-SNAPSHOT.jar & [1] 8719 root@iZwz9h5tizjqqur6xbkjylZ:/www/wwwroot/back-end/college-system-test# nohup: ignoring input and appending output to 'nohup.out' 这些代码是不是表明已经上传jar
这些代码表明你已经登录到阿里云服务器,并且进入到了 `/www/wwwroot/back-end/college-system-test` 目录下。通过 `ls` 命令可以看到该目录下存在 `college-system-0.0.2-SNAPSHOT.jar` 文件,这说明你已经成功将代码上传到了该目录下。
通过执行 `ps -aux | grep college-system-0.0.2-SNAPSHOT.jar` 命令,可以查看该 Java 应用程序的进程信息。输出结果中包含一行 `java -jar college-system-0.0.2-SNAPSHOT.jar`,表明该应用程序正在运行,并且进程 ID 为 `18653`。
接着,你使用 `nohup java -jar college-system-.0.0.2-SNAPSHOT.jar &` 命令在后台运行该 Java 应用程序,并且将输出信息追加到 `nohup.out` 文件中。输出结果中包含一行 `nohup: ignoring input and appending output to 'nohup.out'`,表明命令已经成功地在后台运行,并且输出信息被追加到了 `nohup.out` 文件中。
因此,可以认为你已经成功地将代码上传到了阿里云服务器,并且成功地在后台运行了该 Java 应用程序。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![h5](https://img-home.csdnimg.cn/images/20250102104920.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)