Logo ByteGopher
Logo Inverted Logo
  • Posts
  • Blog
  • CloudNative
  • Infrastructure
    • TimeSeriesDB
  • Kubernetes
  • Note C
  • Note Go
  • React
  • Tips
  • Nodus
  • Interview
  • Life
  • Linux
Hero Image
「Linux」 user

用户和用户组 groups 1groups <user1> <user2> <user3> # 查看当前用户所属的用户组

August 9, 2020 Read
Hero Image

文件权限 文件权限表示 1drwxrwxrwx 3 root wheel 96 Oct 13 20:30 opt 2drwxr-xr-x 6 root wheel 192 Oct 8 18:57 private 3drwxr-xr-x@ 64 root wheel 2048 Oct 8 18:55 sbin 【文件或文件夹】【owner权限】【group权限】【others权限】【 文件数量】 【文件所有者】【文件所在组】【文件夹最后操作日期和时间】 d 表示文件类型为 文件夹 , - 表示文件类型为 文本文件, l 表示链接文件 r 读权限read 4, w 写权限write 2, x 操作权限execute 1 : rwx 按二进制位置 111, 所以对应 421 修改文件权限 1chmod 权限数字 文件名 2chmod -R 744 /mnt/fileA # 表示将整个/mnt/fileA目录与其中的文件和子目录的权限都设置为744 3chmod o w xxx.xxx #表示给其他人授予写xxx.

January 1, 0001 Read
Hero Image

https://www.jianshu.com/p/a6c6f47a5ef7 https://blog.csdn.net/weixin_42096901/article/details/103017044 https://blog.csdn.net/weixin_39406430/article/details/123715072 http://t.zoukankan.com/yangyongjie-p-14576216.html https://zhuanlan.zhihu.com/p/430848775 https://blog.csdn.net/weixin_42340926/article/details/126211173

January 1, 0001 Read
Hero Image

1title: Linux Network Virtualization Network Namespace In order to provide the isolation, Linux has 6 namespaces to split the different resources, shown as follows: Namespace Description Mount Namespace File system mount point CLONE_NEWNET UTS Namespace Hostname CLONE_NETUTS IPC Namespace POSIX process messaging queue CLONE_NEWIPC PID Namespace Process PID number namespace CLONE_NEWPID Network Namespace IP address/Port/Router/IPtables CLONE_NEWNS User Namespace User isolation CLONE_NEWUSER For the process, if they want to use the resources of the Namespace, they should enter the namespace first.

January 1, 0001 Read
Hero Image
「Linux」Systemd

守护进程 http://www.ruanyifeng.com/blog/2016/02/linux-daemon.html

January 1, 0001 Read
Hero Image
「Linux」xargs

January 1, 0001 Read
Hero Image
「Regex」正则表达式

正则表达式主要用来进行字符串匹配操作 1^[0-9]+abc$ 2# ^ 表示以xxx开头的字符串 3# [0-9] 表示匹配0-9之间的一个数字,例如 8; [0-9]+表示匹配0-9之间的多个数字,例如:867 4# abc$ 表示以abc结尾的字符串,$表示以xxx结尾 1^[a-z0-9_-]{5,16}$ 2# 只能含有小写字母,数字,下划线,减号,且长度为5-16的字符串 字符 Description . 除了\r \n以外的任何单字符 \w 匹配字母、数字、下划线,等价于[A-Za-Z0-9_] * 匹配前面的子表达式零次或者多次

January 1, 0001 Read
Hero Image
「tmux」虚拟终端

​ 当使用ssh 连接一台远程计算机的时候,如果此时正在执行一个进程,突然断网了,那么这个进程也会被迫中断了。当重新ssh连接到这台远程计算机的时候,已经找不到之前正在执行的进程了。因为上一次连接的会话(Session)已经终止, 这次的重新连接又新建了一个会话。如果你遇到过这种问题你就会发现: 会话和进程是绑定的,会话终止,当前正在执行的进程也会终止。 ​ 为了解决上述问题,你可以尝试使用下Tmux。 安装及基本使用 1# 安装在需要远程连接的远程服务器上 2apt install tmux 1# 新建 2tmux new -s <session name> 3 4# 切换到某个session 5tmux attach -t <session name> 6 7# 退出某个session,依旧保留进程 8tmux detach 9 10# 分隔窗口 11tmux split-window 12tmux split-window -h # 水平分隔 13 14# 切换窗口 【Ctrl】+【b】 然后按下 【;】 快捷键 前缀键 【Ctrl】+【b】。先按下前缀键后,在使用功能键。 copy-mode use vi shortcuts 1cat <<EOF | tee -a ~/.tmux.conf 2setw -g mode-keys vi 3set -g @plugin 'tmux-plugins/tpm' 4set -g @plugin 'tmux-plugins/tmux-sensible' 5set -g @plugin 'tmux-plugins/tmux-resurrect' 6 7run '~/.

January 1, 0001 Read
Hero Image
「网络」网络基础

What is the network layer? Network-to-network connections are what make the Internet possible. The “network layer” is the part of the Internet communications process where these connections occur, by sending packets of data back and forth between different networks, In the 7-layer OSI model, the network layer is layer 3. The Internet Protocol(IP) is one of the main protocols used at this layer, along with several other protocols for routing, resting and encryption.

January 1, 0001 Read
Hero Image
【Linux】 Systemd

1# 通过Pid获取对应的service 2systemd status <Pid>

January 1, 0001 Read
Hero Image
Extend Disk Space without shutdown

We have a sever for code test, but with the test case growth, the Disk space is not enough for use. Fortunately, we use ubuntu LVM to manage the Disk. 1fdisk /dev/sdb 1pvdisplay https://gyazo.com/40b3c078d6bb755f9cca318b3c28b2cf 1vgextend ubuntu-vg /dev/sdc1 1vgdisplay 1lvdisplay 1lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 2resize2fs /dev/ubuntu-vg/ubuntu-lv Multipass extend VM disk size. Multipass uses qemu to create the VM instance. So you can modify the qemu image manually to change the VM disk size.

January 1, 0001 Read
Hero Image
IPSec

IPsec is a group of networking protocols used for setting up secure encrypted connections, such VPNs, across publicly shared networks. What is IPsec IPsec is a group of protocols that are used together to set up encrypted connections between devices. It helps keep data send over public networks secure. IPsec is often used to set up VPNs, and it works by encrypting IP packets, along with authenticating the source where the packets come from.

January 1, 0001 Read
  • ««
  • «
  • 1
  • 2
  • »
  • »»
Navigation
  • About
  • Skills
  • Recent Posts
  • My Story
Contact me:
  • renqiqiang@outlook.com

Stay up to date with email notification

By entering your email address, you agree to receive the newsletter of this website.

Toha Theme Logo Toha
© 2020-2022 Copyright.
Powered by Hugo Logo