处理:
ls all/*.diff | parallel -k ' 32s 09:49:48
filename=$(basename {} .diff);
# Extract parts: YYYY-MM-DD and HH-MM-SS
d_part=${filename%T*};
t_part=${filename#*T};
# Replace hyphens with colons in the time part only
t_fixed=$(echo ${t_part%.*} | tr "-" ":");
# Combine back into a valid ISO string
ts_iso="${d_part}T${t_fixed}";
echo -n "$(date -d "$ts_iso" +%s) ";
~/wt/archive-tool show {} | grep "Total chunks:" | awk "{print \$3}"
' | tee /tmp/a.txt(*1. 导入数据,假设是空格分隔的两列*)rawData = Import["/tmp/a.txt", "Table"];
(*2. 处理数据:将第一列(Unix Timestamp)转换为 DateObject*)
(*Unix 时间戳是从 1970-01-01 开始的秒数*)
processedData = Map[{DateObject[#[[1]]], #[[2]]} &, rawData];
(*3. 绘制折线图*)
DateListPlot[processedData, PlotStyle -> Blue, Filling -> Bottom,
FrameLabel -> {"Time", "Total Chunks"},
PlotLabel -> "Total Chunks Growth Over Time", GridLines -> Automatic,
PlotRange -> Full, ImageSize -> Large,
FrameTicks -> {{Table[{y, NumberForm[y, {Infinity, 0}]}, {y, 200000,
1200000, 200000}], None}, {Automatic, None}}]