silly / extract_core.sh
周泳恩
添加core文件压缩和解压功能,保留用户自定义config.yaml
314a0ac
raw
history blame contribute delete
325 Bytes
#!/bin/bash
# 确保在脚本所在的目录中运行
cd "$(dirname "$0")"
# 检查core文件是否存在
if [ -f "core" ]; then
echo "压缩core文件..."
# 使用gzip压缩core文件
gzip -9 -c core > core.gz
echo "core文件已压缩为core.gz"
else
echo "错误:core文件不存在"
exit 1
fi