linux命令笔记

2017-08-21  本文已影响0人  任无名F
1. 查看服务器最后重启时间
// 方法一
#last reboot
// 方法二
#who -b
// 方法三
#uptime
2. 根据文件名查找文件
#find [path] -name [filename]
3. 查看进程信息
#ps aux | grep [name]
#ps -ef | grep [name] // 与上一条的区别,会显示PPID(父进程ID)
4. 使用scp复制本地文件到远程服务器
scp [-P port] [[user@]host1:]file1 ... [[user@]host2:]/path/

Tips

-bash: scp: command not found
yum install openssh-clients
# .ssh/config中配置服务器别名
Host ren
HostName 1.2.3.4
Port 8080
User root

在scp中使用服务器别名

scp ./file1 ren:/path/
上一篇 下一篇

猜你喜欢

热点阅读