linux 踩坑记录 -----干货

不多说,linux是什么自己去百度,为了给自己做笔记,免得以后忘记,把一些常用的命令记录下来,

文件移动指令:  mv  目标源文件  移动后的地址    例:   mv   /home/lg/hello.txt    /usr/local/txt   回车     就是把hello.txt文件移动到/usr/local/txt文件夹下

文件复制指令: cp   源文件   复制后的地址

 文件删除指令  rm  -rf  目标名称  例子:  rm - rf /usr/local/txt  回车  会把usr/local/txt  文件夹连同其下的所有文件删除 谨慎操作!

tar.gz解压 :  tar -zvxf 解压目标 -C 解压后的地址    例:  tar     -zvxf     /home/lg/hello.tar.gz     -C    /home/lg/

gz解压gzip   -b     hello.gz

zip解压 :unzip  解压目标   例子  unzip     /home/lg/hello.zip

文件授权命令:  chmod  -R   777   /home/lg/      那么lg 文件夹和它下面的所有子文件夹的属性都变成了777,777是读、写、执行权限,加入-R 参数,就可以将读写权限传递给子文件夹

linux连接到Windows : 使用BvSshServer-inst工具在windows上建立SSH  ,在linux上使用ssh 用户名@远程服务器Ip,根据提示输入密码,则成功连接。。。,若是出现如下问题:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:6zKiuPSPE90dB6PNCj1fICgA1DTrTxPFiVbl82+sS0E.
Please contact your system administrator.
Add correct host key in /c/Users/xuliugen/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/xuliugen/.ssh/known_hosts:4
RSA host key for 119.19.19.19 has changed and you have requested strict checking.
Host key verification failed.

在linux客户端运行:

#vi ~/.ssh/known_hosts

把文件中的IP去掉即可解决

待续。。。

猜你喜欢

转载自blog.csdn.net/qq_34332207/article/details/81476476