摘要: 001、 [root@PC1 test]# start=`date +%s` ## 从 1970 年 1 月 1 日 00:00:00 UTC 到目前为止的秒数(时间戳) [root@PC1 test]# echo $start 1670412402 [root@PC1 test]# end=`da 阅读全文
posted @ 2022-12-07 19:29 小鲨鱼2018 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 001、压缩保留源文件 [root@PC1 test]# ls a.txt [root@PC1 test]# gzip -c a.txt > a.txt.gz ## 压缩并保留源文件 [root@PC1 test]# ls a.txt a.txt.gz 002、解压缩保留源文件 [root@PC1 阅读全文
posted @ 2022-12-07 18:56 小鲨鱼2018 阅读(1656) 评论(0) 推荐(0) 编辑
摘要: 001、通过比较MD5码 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 1 2 5 3 4 6 7 [root@PC1 test]# sort -n a.txt | md5sum ## 排序并生成MD5码 77c58f04583c86f78 阅读全文
posted @ 2022-12-07 16:54 小鲨鱼2018 阅读(66) 评论(0) 推荐(0) 编辑