随笔分类 -  工具

ShellExView Shell Extensions Manager
摘要:http://www.nirsoft.net/utils/shexview.html 阅读全文

posted @ 2021-05-25 13:47 liujx2019 阅读(96) 评论(0) 推荐(0)

按进程名终止进程
摘要:按进程名终止进程 #!/bin/bash echo "Terminate process(es) has " $1 " in name." echo "Self pid " $$ echo "Self name " $0 pids=$(ps -ef | grep $1 | grep -v grep 阅读全文

posted @ 2021-03-11 10:23 liujx2019 阅读(95) 评论(0) 推荐(0)

Shell 脚本 Tips
摘要:数组 filepath="everything mobaxterm gems" arr=($filepath) 打印某个元素 judgefile=${arr[0]} 打印全部元素 echo ${arr[@]} 循环打印每个元素 for x in ${arr[@]}; do echo $x done 阅读全文

posted @ 2021-03-10 18:51 liujx2019 阅读(58) 评论(0) 推荐(0)

Bash 脚本 逐行处理文本文件的内容
摘要:while read -r line; do echo "$line" done < /path/to/file.txt https://unix.stackexchange.com/questions/58040/what-is-the-fastest-way-to-process-line-by 阅读全文

posted @ 2021-03-10 14:31 liujx2019 阅读(201) 评论(0) 推荐(0)

Bash 脚本 从路径分离出文件夹和文件名
摘要:bash to get file name fspec="/exp/home1/abc.txt" filename="${fspec##*/}" # get filename dirname="${fspec%/*}" # get directory/path name other ways awk 阅读全文

posted @ 2021-03-10 14:25 liujx2019 阅读(301) 评论(0) 推荐(0)

Linux 跨平台编译调试
摘要:把修改过的代码发送到编译的机器 #!/bin/bash if [ $# -lt 1 ] then echo "Input the destination such as root@10.4.10.78:~/src/" exit fi file_list="file_list" update_scri 阅读全文

posted @ 2021-03-10 13:56 liujx2019 阅读(102) 评论(0) 推荐(0)

tr与sed命令:将换行符替换为空格
摘要:处理文本时需要将换行符替换为空格,若使用sed命令会比较麻烦,而使用tr命令非常方便。 cat country.txt | sed ':label;N;s/\n/ /;b label' cat country.txt | tr "\n" " " 两个命令输出一致,但是sed命令的输出结尾有换行符,而 阅读全文

posted @ 2021-03-10 13:37 liujx2019 阅读(2434) 评论(0) 推荐(0)

MSB LSB 大端 小端
摘要:最高有效位(MSB) 指二进制中最高值的比特。在16比特的数字音频中,其第1个比特便对16bit的字的数值有最大的影响。例如,在十进制的15,389这一数字中,相当于万数那1行(1)的数字便对数值的影响最大。比较与之相反的“最低有效位”(LSB)。 汇编中,比如8位2进制数10000001,其中第一 阅读全文

posted @ 2021-03-03 10:36 liujx2019 阅读(491) 评论(0) 推荐(0)

Ubuntu Zip
摘要:zip命令zip -r myfile.zip test/将test目录下打包成myfile.zip。运行实例:image.pngunzip命令unzip myfile.zip将myfile.zip.解压到当前目录下。运行实例:image.png扩展删除压缩包内的文件$ zip -d myfile.z 阅读全文

posted @ 2021-03-01 11:24 liujx2019 阅读(149) 评论(0) 推荐(0)

免费的 Markdown 编辑器
摘要:当作 md 文件的阅读器非常好用。 https://www.typora.io/ 阅读全文

posted @ 2021-02-25 15:52 liujx2019 阅读(137) 评论(0) 推荐(0)

.ico 在线转换 可以一张图片转换成多种尺寸放在一个 .ico 里面
摘要:https://icoconvert.com/ 阅读全文

posted @ 2021-01-19 16:27 liujx2019 阅读(879) 评论(0) 推荐(0)

Shell 脚本查看是谁调用的自己
摘要:用 ps aux | grep shell_script_name 可以看到父进程,也就是调用者。 output = 'ps aux | grep shell_script_name' logger -s $output 可以把结果记录在 syslog 里面 ps aux | grep system 阅读全文

posted @ 2021-01-12 09:36 liujx2019 阅读(1542) 评论(0) 推荐(0)

Apache 2.4 编译 configure: WARNING: Your APR does not include SSL/EVP support. To enable it: configure --with-crypto
摘要:编译 httpd 时会有如下警告 configure: WARNING: apr/apr-util is compiled without ldap supportconfigure: WARNING: apr/apr-util is compiled without ldap supportcon 阅读全文

posted @ 2021-01-07 09:19 liujx2019 阅读(489) 评论(0) 推荐(0)

RedHat 修改etc/resolv.com 添加DNS,重启网络,文件就被重置了
摘要:RedHat5.5的/etc/resolv.conf文件被复写的解决 [日期:2013-06-08] 来源:Linux社区 作者:wangyublues [字体:大 中 小] 公司RedHat5.5系统,配置了/etc/resolv.conf文件后重启网络服务,此文件内容就被复写了。经过查看红帽官方 阅读全文

posted @ 2021-01-06 17:51 liujx2019 阅读(445) 评论(0) 推荐(0)

build httpd 报警 configure: WARNING: Your APR does not include SSL/EVP support. To enable it: configure –with-crypto
摘要:出处: https://www.entblog.net/2554.html 最新版の apache2-2.4.28-1vl7.src.rpm が存在していたので 早速、リビルドすると以下のWARNINGが表示する状態でした 1 configure: WARNING: Your APR does no 阅读全文

posted @ 2021-01-06 14:30 liujx2019 阅读(138) 评论(0) 推荐(0)

画 流程图 的开源软件 drawio
摘要:drawio https://github.com/jgraph/drawio-desktop/releases/tag/v13.9.9 阅读全文

posted @ 2020-12-29 09:22 liujx2019 阅读(421) 评论(0) 推荐(0)

无符号字符型 与 扩展ASCII码表
摘要:In C++ we have seen there is character type data called char. Sometimes we have seen unsigned char also. So here we will see what is basically the uns 阅读全文

posted @ 2020-12-24 17:59 liujx2019 阅读(340) 评论(0) 推荐(0)

英语邮件结尾时常用的20个句子
摘要:出处 https://www.linkedin.com/pulse/20140903131536-29650941-20-phrases-for-closing-an-email By Matt Schmid A common problem We often hear how writing em 阅读全文

posted @ 2020-12-16 14:03 liujx2019 阅读(910) 评论(0) 推荐(0)

Python 获取文件夹里所有 log 的起止时间戳
摘要:import sys, os def get_timestamp(file_name): cnt = 0; with open(file_name,"r") as f: for line in f.readlines(): line = line.strip() #print (line) if(c 阅读全文

posted @ 2020-12-03 13:22 liujx2019 阅读(578) 评论(0) 推荐(0)

Python 脚本,计算相邻两条带 token 的 log 的时间差
摘要:import sys, os def get_interval(file_name, key_word): cnt = 0; prev = 0; interval_list = []; with open(file_name,"r") as f: for line in f.readlines(): 阅读全文

posted @ 2020-12-03 13:21 liujx2019 阅读(193) 评论(0) 推荐(0)

导航