Compared files  

Left
/fw/roborock.vacuum.p5/3.5.4_0528/xout/_root/opt/rockrobo/rrlog/tar_extra_file.sh
Last modified2019-11-14 03:52:02
Size468 Bytes (22 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
/fw/roborock.vacuum.p5/3.5.8_0698/xout/_root/opt/rockrobo/rrlog/tar_extra_file.sh
Last modified2020-03-30 02:39:17
Size858 Bytes (34 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged613
Inserted15
Deleted11
Ignored00
Changed324




   Comparison Details  

1 skipped line
2 2 set -x
3 3 reg=^[A-Za-z0-9/_]+$
4 4 if [[ "$RR_UDATA" =~ $reg ]];then
5     echo "pass" 5   echo "pass"
6 6 else
7     exit 7   RR_UDATA="/mnt/data"
8 8 fi
  9  
  10 TAR_CMD=$(which tar)
  11 if which ionice > /dev/null; then TAR_CMD="ionice -c2 -n3 ${TAR_CMD}"; fi
  12 if which nice > /dev/null; then TAR_CMD="nice -n 19 ${TAR_CMD}"; fi
  13  
9 14 mkdir -p $RR_UDATA/rockrobo/rrlog
10 cd $RR_UDATA/rockrobo/rrlog  
11 15  
12 16 cd /var/log
  17 TAR_FILE=$RR_UDATA/rockrobo/rrlog/varlog.tar.xz
  18 if [ -f ${TAR_FILE} ]; then
  19   echo "WARNING: TAR_FILE ${TAR_FILE} already exist"
  20   ls -l ${TAR_FILE}
  21   ${TAR_CMD} -tf ${TAR_FILE}
  22   echo -n > ${TAR_FILE}
  23   rm ${TAR_FILE}
  24 fi
  25  
13 nice -n 19 /bin/tar Jcf $RR_UDATA/rockrobo/rrlog/varlog.tar.xz ./upstart ./boot.log ./bootdmesg ./dmesg ./faillog ./kern.log ./lastlog ./rr_try_mount.log ./syslog ./messages* 26 ${TAR_CMD} Jcvf ${TAR_FILE} $(ls upstart boot.log bootdmesg dmesg faillog kern.log lastlog rr_try_mount.log syslog messages*)
14 rm -rf *.xz 27  
15 rm -rf *.0  
16 rm -rf *.1 28 find . -maxdepth 1 -name '*.xz' -print -exec rm -rf '{}' +
17 rm -rf *.2  
18 rm -rf *.3 29 find . -maxdepth 1 -name '*.[0-3]' -print -exec rm -rf '{}' +
  30  
19 31 echo "" > /var/log/syslog
20 32 echo "" > /var/log/kern.log
21 33  
1 skipped line

   Text comparison Options  

Syntax colouring language used: Shell
Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line