被攻击后获取的常用密码集
摘要:https://files.cnblogs.com/files/blogs/744713/pass.zip?t=1658998048
阅读全文
bash shell计算时间差
摘要:function getTiming() { start=$1 end=$2 start_s=$(echo $start | cut -d '.' -f 1) start_ns=$(echo $start | cut -d '.' -f 2) end_s=$(echo $end | cut -d '
阅读全文
linux-系统崩溃后恢复
摘要:故意让系统崩溃 echo "c" > /proc/sysrq-trigger 办法就是:重启 输入这个命令之后终端连接就会断开,无法输入命令,所以只能在后台重启 去掉系统卡住一段时间后引起panic异常死机: echo 0 > /proc/sys/kernel/hung_task_panic 系统p
阅读全文
检测磁盘空间,删除指定类型最早创建的文件
摘要:#!/bin/bashwhile [ 1 ]do sleep 30 avail=`df / -h | awk '{print $4}' | awk '{sum+=$1}END{print sum}'` echo "disk avail:"$avail"G" if [ $avail -lt 5 ] t
阅读全文
LINUX C ANSI 转 UTF8
摘要://iconv_linux下字符集编码转换轻松实现 (1) iconv_t iconv_open(const char *tocode, const char *fromcode); //此函数说明将要进行哪两种编码的转换,tocode是目标编码,fromcode是原编码,该函数返回一个转换句柄,供
阅读全文
linux-内存分布测试
摘要:#include <stdio.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <time.h> #include <stdlib.h> #include <pthread.h> /* int new_si
阅读全文
linux-线程资源释放-线程属性-exit资源释放规律
摘要:#include <stdio.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <time.h> #include <stdlib.h> #include <pthread.h> #include <err
阅读全文
linux gdb 多进程
摘要:set follow-fork-mode [parent|child]
阅读全文
linux-多线程内存泄漏问题查找方法
摘要:如果可以安装valgrind,建议使用valgrind 多线程情况下,可根据不同线程申请内存的地址分布规律去查找内存泄漏,此方法比较麻烦。 1.执行下面命令检测内存变化存在变动的内存起始地址while true; do pmap -x $(pidof your_bin) > test1; echo
阅读全文
linux 查看端口
摘要:lsof -i:8080:查看8080端口占用 lsof abc.txt:显示开启文件abc.txt的进程 lsof -c abc:显示abc进程现在打开的文件 lsof -c -p 1234:列出进程号为1234的进程所打开的文件 lsof -g gid:显示归属gid的进程情况 lsof +d
阅读全文
ubuntu-16 安装-开启-关闭-telnet
摘要:安装openbsd-inetd sudo apt-get install openbsd-inetd 安装telnetdsudo apt-get install telnetd vi /etc/inetd.conf 末尾手动添加 telnet stream tcp nowait root /usr/
阅读全文
linux-udp-客户端服务器结合体
摘要:////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
阅读全文
linux 格式化u盘
摘要:fdisk -l 检查U盘的设备名 fdisk /dev/xxxxx 输入p 输入d 分别删掉所有分区 输入n 创建分区,(创建两个默认分区) 输入w 退出分区操作 mkfs -V -t vfat /dev/sdb1 格式化成vfat文件系统,以便Windows环境也可识别 参考 https://b
阅读全文
windows下使用系统工具计算文件MD5值
摘要:certutil -hashfile filename MD5
阅读全文
linux 测试flash磁盘io读写速度
摘要:写磁盘速度测试time dd if=/dev/zero of=/testw.dbf bs=4k count=100k conv=fsync读磁盘速度测试time dd if=/testw.dbf of=/dev/null bs=4k 其中/dev/zero是一个伪设备,它只产生空字符流,对它不会产生
阅读全文
tar使用多线程提高压缩速度
摘要:安装 pigz tar -c --use-compress-program=pigz -f tar.file dir "--use-compress-program ="告诉tar要使用的压缩程序
阅读全文
linux 换国内源
摘要:以配置清华源为例: cat /etc/os-release查看当前Debian系统的版本 PRETTY_NAME="Debian GNU/Linux 9 (stretch)"NAME="Debian GNU/Linux"VERSION_ID="9"VERSION="9 (stretch)"VERSI
阅读全文