编程笔记

  • Linux find 命令对查找到文件执行其它命令操作(xargs和-exec)

    Linux find 命令不仅可以用来在指定目录下查找文件,还可以对查找到的文件执行其它命令批量操作文件,如复制,删除,修改等,本文主要介绍find 命令对查找到文件执行其它命令操作的方法。 原文地址:Linux find 命…

    智能运维 2022年6月19日
  • nginx七层负载—会话共享

    nginx七层负载—会话共享 会话保持相关信息存储 cookie - 前端开发人员将用户登录的信息保存到浏览器中(开发者工具->Application->Cookies) - 如果仅将用户的登录信息记录在Cookie中,随时可以在浏览器中篡改 …

    智能运维 2022年6月19日
  • Linux通过端口获取进程pid

    背景 在日常工作或者运维中经常会用到一些bash脚本帮忙,这里记录一种通过搜索端口号获取linux中监听此端口的进程进程pid的脚本 代码 port=8888 pid=$(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" …

    智能运维 2022年6月19日
  • linux 修改时区

       1. 执行tzselect命令 --> 选择Asia --> 选择China --> 选择1) Beijing Time >然后输入1。   2.  把 TZ='Asia/Shanghai'; export TZ  放在/etc/profile下3. 执行 source /etc/profile 生效        

    智能运维 2022年6月19日
  • centos 安装谷歌浏览器和selenium环境

    1,安装谷歌浏览器 vi /etc/yum.repos.d/google-chrome.repo name=google-chrome baseurl=https://dl.google.com/linux/chrome/rpm/stable/x86_64 enabled=1 gpgcheck=1 gpgkey=https://dl.google.com/linux/linux_…

    智能运维 2022年6月19日
  • Linux最常用命令

    第一章 Linux基础命令 ls 释义:list,列出目录中文件的信息常见用法: ls ==> 列出当前目录的文件名 ls -l ==> 列出文件详情 ls -a ==> 列出文件名(含隐藏文件) ls -la ==> 列出文件详情(含隐藏文…

    智能运维 2022年6月19日
  • linux debug cmd

    temporary close kernel print message: echo 0 > /proc/sys/kernel/printk temporary open all kernel print message: echo 8 > /proc/sys/kernel/printk look kernel interrupt message: cat /proc/interru…

    智能运维 2022年6月19日
  • Linux免密配置

    [root@oracle11g ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again…

    智能运维 2022年6月19日
  • linux后台执行程序

    1、使用&   (后台执行,不能关闭窗口) 2、使用nohup   【你的命令】  &     (后台执行,能关闭窗口) 3、使用screen      (后台执行,能关闭窗口)   1)进入screen   2)执行命令  /home/vlog/aa.…

    智能运维 2022年6月19日
  • Linux/Ubuntu 设置时区

    更新记录2022年6月17日 发布。2022年6月11日 开始。 快速设置时区为中国时区。 sudo timedatectl set-timezone Asia/Chongqing 1.查看当前时区 timedatectl 2.查看所有支持的时区 timedatectl list-timezones 3.设…

    智能运维 2022年6月19日