编辑
2024-12-14
linux
00
请注意,本文编写于 134 天前,最后修改于 134 天前,其中某些信息可能已经过时。

目录

git上传
linux命令
windows常用命令
邮箱备忘录
清理镜像、Pod

git上传

git
git add . git commit -m [message] git remote add origin https://gitee.com/shiguangqihang/note.git git push -u origin "master"

linux命令

bash
ps -aux |sort -rnk 4 |head -20 ##查看内存占用高的进程 ps -aux |sort -rnk 3 |head -20 ##查看cpu占用高的进程 docker stop $(docker ps -qa) ##批量关闭容器 traceroute ##linux查看路由跳转 echo 3 > /proc/sys/vm/drop_caches ##清除缓存 cat /proc/cpuinfo |grep "cpu cores" |uniq ##查看cpu的核数 dmidecode -s system-serial-number ##查序列号 du -m * |sort -rn |more ##按文件大小排序 split -b 10M 文件名 -d 切割后的文件名 wget -b -c http://xxx ##-b后台下载并记录日志,-c断点续传 crictl images|grep none|awk '{print $3}'|xargs crictl rmi ##k8s-containerd删除未使用镜像 curl https://ifconfig.me ##curl https://ifconfig.me ifconfig eth0 | awk -rn 'NR==2{print $2}' ##正则取ip echo > /dev/tcp/ip/port yum install -y dmidecode && dmidecode --type system ## linux查看物理服务器机型和品牌 last ## 读取/var/log/wtmp文件,显示该文件记录登录的用户名 nohup rsync -av --delete /dsplm /backup/dsplm/ & ## 后台备份+增量备份

windows常用命令

bash
# 查看服务器机型和品牌 win + R ——> cmd ——> wmic ——> csproduct # ping网段 win + R ——> cmd ——> for /L %d in (1,1,255) do ping 172.24.23.%d >> "C:\Users\ROG\Desktop\ping.txt" ## windows查看路由跳转 tracert ## windows查看端口进程 netstat -ano |findstr XXX ##得到相应进程的软件 tasklist | findstr PID

邮箱备忘录

txt
谷歌邮箱:guangshi52@gmail.com 红帽账号 https://access.redhat.com/downloads/content/rhel ftzkredhat RED_2024hatfoton

清理镜像、Pod

bash
crictl rmi --prune ## 删除未使用镜像 docker image prune -a ## 删除未使用镜像 nerdctl system prune -a ## 删除未使用镜像 kubectl delete pod --grace-period=0 --force ## 强制删除Pod docker container prune ## 删除所有退出状态容器

本文作者:拾光

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!