]>
zdv2.bktei.com Git - BK-2020-03.git/blob - sysutils/bkStConflictFinder.sh
   2 # Desc: Identifies `sync-conflict` files in specified directory 
   4 # Usage: syncthingConflictFinder.sh arg1 
   5 # Example: syncthingConflictFinder.sh "$HOME/Sync/" 
   6 # Input: arg1   [path of dir to search recursively] 
   9 arg1
="$1"; # Get argument 1 
  12 if [ -d "$arg1" ]; then 
  14     echo "DEBUG:searchDir:$searchDir" 1>&2; 
  16     echo "ERROR:Not a dir:$arg1" 1>&2; exit 1; 
  19 # List `sync-conflict` files. 
  20 find -L "$searchDir" -type f 
-iname "*sync-conflict*" -exec du 
-h {} \
; 2>/dev
/null
; 
  22 # List `sync-conflict` files of size 1 MB to 999 GB. 
  23 #find -L "$searchDir" -type f -iname "*sync-conflict*" -exec du -h {} \; 2>/dev/null | grep "G      \|M     "; 
  27 # Author: Steven Baltakatei Sandoval (reboil.com) 
  30 #===Dependency Version Information=== 
  31 # find (GNU findutils) 4.6.0.225-235f 
  32 # Copyright (C) 2019 Free Software Foundation, Inc. 
  33 # License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. 
  34 # This is free software: you are free to change and redistribute it. 
  35 # There is NO WARRANTY, to the extent permitted by law. 
  37 # Written by Eric B. Decker, James Youngman, and Kevin Dalley. 
  38 # Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)  
  42 # Copyright (C) 2018 Free Software Foundation, Inc. 
  43 # License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. 
  44 # This is free software: you are free to change and redistribute it. 
  45 # There is NO WARRANTY, to the extent permitted by law. 
  47 # Written by Mike Haertel and others; see 
  48 # <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.