Spaces:
Building
Building
# 确保在脚本所在的目录中运行 | |
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 |