mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
check_large_files: adjust file compression to better suit APU2s, add progress indicator
Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
@@ -460,13 +460,17 @@ compress_report_data() {
|
|||||||
note "compress report data..."
|
note "compress report data..."
|
||||||
cd /home/lanforge
|
cd /home/lanforge
|
||||||
# local csvfiles=( $( find /home/lanforge -iname "*.csv" -print0 ))
|
# local csvfiles=( $( find /home/lanforge -iname "*.csv" -print0 ))
|
||||||
while read f; do
|
local vile_list=(`find html-reports/ lf_reports/ report-data/ tmp/ -type f \
|
||||||
(( $verbose > 0 )) && echo " compressing $f"
|
-a \( -name '*.csv' -o -name '*.pdf' -o -name '*.pdf' -o -name '*.pcap' -o -name '*.pcapng' \)`)
|
||||||
xz -7 "$f"
|
counter=1
|
||||||
done < <(find html-reports/ lf_reports/ report-data/ tmp/ -type f \
|
for f in "${vile_list[@]}"; do
|
||||||
-a \( -name '*.csv' -o -name '*.pdf' -o -name '*.pdf' -o -name '*.pcap' -o -name '*.pcapng' \) )
|
(( $verbose > 0 )) && echo " compressing $f" || echo -n " ${counter}/${#vile_list[@]}"
|
||||||
|
nice xz -T0 -5 "$f"
|
||||||
|
(( counter+=1 ))
|
||||||
|
done
|
||||||
totals[r]=0
|
totals[r]=0
|
||||||
cd -
|
cd -
|
||||||
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_var_tmp() {
|
clean_var_tmp() {
|
||||||
|
|||||||
Reference in New Issue
Block a user