网站首页 站内搜索

搜索结果

查询Tags标签: test2,共有 120条记录
  • linux 中调用shell脚本时指定工作目录为shell脚本所在的目录

    1、root@DESKTOP-1N42TVH:/home/test# ls root@DESKTOP-1N42TVH:/home/test# ls /home/test2/* /home/test2/a.txt /home/test2/test.sh root@DESKTOP-1N42TVH:/home/test# cat /home/test2/test.sh ## shell脚本所在目录及内容 #!/bin/bash wc -l ./a.txt root@DESK…

    2022/4/27 7:12:52 人评论 次浏览
  • QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

    1、问题 2、解决方法root@DESKTOP-1N42TVH:/home/test2# vim /etc/profile ## 在配置文件末尾追加如下两句 export XDG_RUNTIME_DIR=/usr/lib/ export RUNLEVEL=3 source一下:root@DESKTOP-1N42TVH:/home/test2# source /etc/profile 3、测试(刚才的问题解决)

    2022/4/27 6:14:27 人评论 次浏览
  • linux 中 grep -q选项

    1、linux 中 grep -q选项表示静默输出, 即不显式匹配结果root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt ## 测试数据 d e j s q u z c b root@DESKTOP-1N42TVH:/home/test2# grep "s" a.txt ## 直…

    2022/4/25 7:13:11 人评论 次浏览
  • 玩转Mysql系列 - 第5天:DML操作汇总,确定你都会?

    对mysql感兴趣的,加一下我的微信itsoku,拉你入群交流技术。 这是Mysql系列第5篇。 环境:mysql5.7.25,cmd命令中进行演示。 DML(Data Manipulation Language)数据操作语言,以INSERT、UPDATE、DELETE三种指令为核心,分别代表插入、更新与删除,是必须要掌握的指令,DM…

    2022/4/24 2:12:48 人评论 次浏览
  • Python基础语法(二十一)--闭包之装饰器

    装饰器 装饰器的原理就是闭包,调用方式不变def test(func):print(----func----)def test2():print(----test2这里是扩展功能----)func()return test2 @test def test1():print(----test1----)test1()执行流程图

    2022/4/16 22:12:34 人评论 次浏览
  • linux 中 case条件测试语句

    1、[root@centos7pc1 test2]# ls test.sh [root@centos7pc1 test2]# cat test.sh ## 测试脚本 #!/bin/bash read -p "please input an number or an letter: " KEY case $KEY in [a-z]|[A-Z]) echo "You had entered an letter!" ;; [0-9]) echo &q…

    2022/4/7 7:23:56 人评论 次浏览
  • linux中一次性计划任务服务at命令

    1、创建计划任务服务[root@centos7pc1 test2]# ls [root@centos7pc1 test2]# date Wed Apr 6 17:16:12 CST 2022 [root@centos7pc1 test2]# at now+2 min ## 设置任务时间, 2分钟后 at> touch a.txt ## 设置执行的命令 at> <EOT> …

    2022/4/7 7:23:52 人评论 次浏览
  • linux 中 awk NF的作用

    1、删除空行root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt df gfdgdf gg erfd gg wwkkkk jjjj root@DESKTOP-1N42TVH:/home/test2# cat -A a.txt df gfdg$ $ df gg er$ ^I^I$ fd gg ww$^I^I$ kkkk jjjj$ root@DESKTOP-1N42TVH…

    2022/4/4 7:19:31 人评论 次浏览
  • linux 中awk命令计算每行数据的和、平均数、最大值、最小值

    1、测试数据root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt 3 1 4 2 1 2 6 3 2 1 3 3 2、计算每行数据的和root@DESKTOP-1N42TVH:/home/test2# cat a.txt 3 1 4 2 1 2 6 3 2 1 3 3 root@DESKTOP-1N42TVH:/home/test2# awk {su…

    2022/4/4 7:19:26 人评论 次浏览
  • While控制器

    Condition (function or variable) :条件(函数或变量)。条件为 Flase 的时候,才会跳出 While 循环,否则一直执行 While 控制器下的样例。 1、不填(空):当 While 控制器下最后一个样例执行失败后 跳出循环 test1、test2、test3,都能运行成功,会一直运行下去,陷…

    2022/3/20 23:30:29 人评论 次浏览
  • ElasticSearch的基操和进阶查询

    一,ElactisSearch简介 1. 定义 ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java开发的,并作为Apache许可条款下的开放源码发布,是当前流行的企业级搜索引擎。设计用于云计算中,…

    2022/3/18 23:28:39 人评论 次浏览
  • nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/conf/sites-enabled/test2.con

    使用/usr/local/nginx/sbin/nginx -t 检查nginx配置文件时报错:nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/sites-enabled/test2.conf:1 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed 原因:有相同名称的up…

    2022/2/22 7:26:52 人评论 次浏览
  • @Transactional同类方法调用不生效及解决方法

    同一个类中方法调用会可能导致@Transactional失效 同类中方法test1调用方法test2,test1没有声明注解事务,而test2方法有。则外部调用test1之后,方法test2的事务是不会起作用的。 转载:https://blog.csdn.net/weixin_38898423/article/details/113835501?utm_medium=d…

    2022/2/21 6:27:58 人评论 次浏览
  • Redhat7.4-Python安装配置cx_Oracle

    上传必要包文件这里不做赘述。 [zhangsan@test2 ~]$ unzip instantclient-basic-linux.x64-11.2.0.4.0.zip -bash: unzip: 未找到命令[zhangsan@test2 ~]$ yum install -y unzip zip已加载插件:product-id, search-disabled-repos, subscription-manager[zhangsan@test2 …

    2022/2/6 19:12:50 人评论 次浏览
  • python函数

    文章目录 一、函数的定义二、4种函数的参数形式三、函数返回值四、函数的作用域,全局/局部变量五、函数的嵌套六、函数的递归一、函数的定义# 创建高楼 def create_building():# 创建房间create_room()# 创建电梯create_stair()def create_room():print(开始创建房间)pri…

    2022/2/4 12:14:47 人评论 次浏览
扫一扫关注最新编程教程