Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

7月5日最近命令及处理记录

1.进程及日志常用命令

pgrep -f ./test #查看./test名称的进程的pid
pkill ./test #杀死./test的进程
tail -n 10 test.log | grep "hello" #搜索test.log文件中最后10行中的hello的行

2.grep

参数
-i:忽略大小写。
-v:反向选择,即只显示不匹配的行。
-c:仅显示匹配的行数,而不显示匹配的行内容。
-l:仅列出包含匹配文本的文件名,而不显示匹配的行内容。
-n:显示匹配的行号及该行内容。
-r 或 -R:递归搜索目录下的所有文件。
-E:使用扩展正则表达式。
-F:将模式作为固定字符串处理,而不是正则表达式。
-o:仅显示匹配到的字符串,而不是整行。
搜索文件 example.txt 中以 "err" 开头后跟任意字符的单词:

grep -E "err.*" example.txt

3.strace命令

用于监控和记录 Linux 操作系统上运行的程序执行的所有系统调用及其接收的信号。strace 可以附加到正在运行的进程上,也可以在新启动的程序上立即开始跟踪。

  • -p:附加到正在运行的进程并跟踪它。
    strace -p 进程ID
    strace -o output.txt ls #将ls进程的追踪输出保存到文件

    4.其它命令

    kubectl get pods #查看所有pods
    kubectl get pods | grep "test" #查看有test的pod
    kubectl exec -it <podname> /bin/bash #接入pod

    5.cloudflare问题

    5.1. 国外域名购买

    免备案:namesile
    这里需要填写个人的消息(可以乱填),之后接入域名管理页面,将dns服务器修改未cloudflare提供的。

    5.2.cloudflare

    添加域名如:ljsea.xyz
    下一步选择免费服务,之后cloudflare将给对应的dns服务器域名,到namesile中修改dns服务器,等待一段时间(几十分钟到几小时),域名显示打勾就可以。
    域名解析ipv6地址,添加代理,在待代理的服务器上配置域名的网站,如test.ljsea.xyz,(这里一定不要在服务器这里再配置https的证书,若配置之后,浏览器访问该地址会出现重定向次数过多的问题,若要配置ssl证书则在cloudflare:进入Cloudflare后台 -> SSL/TLS -> 概述,将SSL/TLS加密模式改为 "完全" 再次尝试访问)。配置完成之后可以在纯ipv4环境下访问ipv6的网站。
    cloudflare配置代理之后好像生效时间没有纯dns快,且国内目前访问代理后的网站速度较慢。

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇