小陆同学

python 中文名:蟒蛇,设计者:Guido van Rossum

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

随笔分类 -  linux

1 2 下一页

linux--jenkins安装
摘要:安装Jenkins 一、安装 Jenkins 前的环境准备(CentOS7) 1.添加yum仓库源 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo 2.导入仓库源的key(秘钥) 阅读全文

posted @ 2022-05-07 20:02 小陆同学 阅读(223) 评论(0) 推荐(0) 编辑

shell--将文件上传至ftp
摘要:HOST='xx.xx.xx.xx' USER='xx' PASSWD='xxxx' file_name="as.txt" # ftp -v -n HOST<<EOFuser{USER} ${PASSWD} binary # ftp路径 cd /home/deploy # 本地路径 lc 阅读全文

posted @ 2022-05-07 19:38 小陆同学 阅读(253) 评论(0) 推荐(0) 编辑

mysql备份任务
摘要:crontab -l 查看定时任务 #定时备份mysql数据库 10 00 * * * /usr/local/shell/innobackupex.sh cat /usr/local/shell/innobackupex.sh 查看备份脚本 #!/bin/sh # MySQL端口 PORT='330 阅读全文

posted @ 2022-01-16 11:05 小陆同学 阅读(43) 评论(0) 推荐(0) 编辑

linux搭建ftp
摘要:FTP 是File Transfer Protocol(文件传输协议)的英文简称,而中文简称为“文传协议”。用于Internet上的控制文件的双向传输。同时,它也是一个应用程序(Application)。基于不同的操作系统有不同的FTP应用程序,而所有这些应用程序都遵守同一种协议以传输文件。在FTP 阅读全文

posted @ 2022-01-16 10:40 小陆同学 阅读(202) 评论(0) 推荐(0) 编辑

linux获取当前pts
摘要:获取当前pts [root@192_168_1_165 ~]# echo $SSH_TTY /dev/pts/3 [root@192_168_1_165 ~]# env | grep pts SSH_TTY=/dev/pts/3 检测指定pts的运行程序 [root@192_168_1_165 lu 阅读全文

posted @ 2022-01-16 10:39 小陆同学 阅读(632) 评论(0) 推荐(0) 编辑

python实现linux命令结果输出
摘要:def sh(self,cmds, print_msg=True): print('sh') msgStr = [] env = ###dev### compilePopen = subprocess.Popen(cmds,shell=True,stdout=subprocess.PIPE,clos 阅读全文

posted @ 2022-01-16 10:30 小陆同学 阅读(415) 评论(0) 推荐(0) 编辑

python实现linux远程操控windows执行cmd命令
摘要:宿主机: 1、在Linux服务器上的处理 首先需要在Linux中安装python,并且安装pywinm库。安装之前首先需要安装isodate和xmlwitch两个依赖包,在安装pywinrm。下面是安装时用到的命令。 安装依赖包 pip install isodatepip install xmlw 阅读全文

posted @ 2022-01-16 10:15 小陆同学 阅读(798) 评论(0) 推荐(0) 编辑

linux--安装zbar,亲测有效
摘要:什么是ZBar?ZBar是一个开源库,用于扫描、读取二维码和条形码。支持的二维码包括:EAN/UPC,QR等。 ubuntu16.04安装方式 sudo apt-get install libzbar-dev pip install zbar # 亲测有效 centos7 安装方式 yum inst 阅读全文

posted @ 2020-09-26 14:26 小陆同学 阅读(3347) 评论(0) 推荐(0) 编辑

linux--日志文件过大?查看日志文件某个时间段的内容
摘要:某个时间段的日志输出到新文件 sed -n '/2020-06-17 17:00:00/,/2020-06-17 18:50:59/p' nohup.out >> 061717.log 查看文件大小 ll -lh 061717.log 将最近200行文件输出到新文件 sudo tail -200 n 阅读全文

posted @ 2020-08-28 20:54 小陆同学 阅读(1172) 评论(0) 推荐(0) 编辑

linux--如何拷贝目录
摘要:linux复制指定目录下的全部文件到另一个目录中复制指定目录下的全部文件到另一个目录中文件及目录的复制是经常要用到的。linux下进行复制的命令为cp。假设复制源目录 为 dir1 ,目标目录为dir2。怎样才能将dir1下所有文件复制到dir2下了如果dir2目录不存在,则可以直接使用cp -r 阅读全文

posted @ 2020-08-28 20:49 小陆同学 阅读(6324) 评论(0) 推荐(0) 编辑

linux--远程连接windows并执行cmd命令
摘要:1、在Linux服务器上的处理 首先需要在Linux中安装python,并且安装pywinm库。安装之前首先需要安装isodate和xmlwitch两个依赖包,在安装pywinrm。下面是安装时用到的命令。 pip install isodate pip install xmlwitch pip i 阅读全文

posted @ 2020-08-28 20:29 小陆同学 阅读(3616) 评论(0) 推荐(0) 编辑

shell--脚本之间传值,模仿jenkins内置变量的功能
摘要:# vim father.sh name='zhangsan' # vim child.sh source /mnt/father.sh echo $name # sh child.sh 输出内容: zhangsan 阅读全文

posted @ 2020-04-17 23:23 小陆同学 阅读(774) 评论(0) 推荐(0) 编辑

python--os模块递归本地目录
摘要:def getAllDirRE(path, sp = ""): #得到当前目录下所有的文件 filesList = os.listdir(path) #处理每一个文件 sp += " " for fileName in filesList: #判断是否是路径(用绝对路径) fileAbsPath = 阅读全文

posted @ 2020-04-17 23:17 小陆同学 阅读(427) 评论(0) 推荐(0) 编辑

paramiko--密钥连接远端服务器并递归目录
摘要:from stat import S_ISDIR as isdir try: private_key = paramiko.RSAKey.from_private_key_file('/root/.ssh/id_rsa') t = paramiko.Transport((ip, 22)) t.con 阅读全文

posted @ 2020-04-17 23:13 小陆同学 阅读(468) 评论(0) 推荐(0) 编辑

java--Error: JAVA_HOME is not defined correctly. We cannot execute
摘要:前情:之前用java 1.8,因业务需求要用到1.7,多版本jdk安装后,echo $JAVA_HOME路径指的不是我想要的,把环境变量1.7注释掉仍然不起作用,把新安装的1.7删除重新编译,报错:JAVA_HOME is not defined correctly. We cannot execu 阅读全文

posted @ 2020-03-13 23:58 小陆同学 阅读(3246) 评论(0) 推荐(0) 编辑

mysql5.7--sql_mode ONLY_FULL_GROUP_BY问题
摘要:(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'XX' which is not functionally dependent on columns i 阅读全文

posted @ 2020-03-03 21:18 小陆同学 阅读(289) 评论(0) 推荐(1) 编辑

linux--python程序员安装大全
摘要:linux安装python3 https://www.cnblogs.com/yhongji/p/9383857.html linux安装git yum install git linux安装mysql 5.7 https://www.cnblogs.com/daemon-/p/9009360.ht 阅读全文

posted @ 2020-03-03 00:36 小陆同学 阅读(208) 评论(0) 推荐(0) 编辑

python--安装mysqlclient报错
摘要:|████████████████████████████████| 90 kB 9.5 MB/s ERROR: Command errored out with exit status 1: command: /usr/local/python3/bin/python3.7 -c 'import 阅读全文

posted @ 2020-03-03 00:32 小陆同学 阅读(1503) 评论(0) 推荐(0) 编辑

python--安装ldap报错
摘要:Running setup.py install for python-ldap ... error ERROR: Command errored out with exit status 1: command: /usr/local/python3/bin/python3.7 -u -c 'imp 阅读全文

posted @ 2020-03-03 00:24 小陆同学 阅读(2949) 评论(0) 推荐(0) 编辑

1 2 下一页
点击右上角即可分享
微信分享提示