bin: deduplication with rmlint and download handling
This commit is contained in:
parent
863ef2051b
commit
289c583fbe
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh -e
|
||||
rmlint --max-depth=5 --keep-hardlinked --rank-by=HpOdlam -o pretty -o sh:/tmp/dedup.sh "$@"
|
||||
printf "Enter to confirm, any text to skip (answer does not matter if nothing was printed above this line) "
|
||||
read -r answer
|
||||
test -n "$answer" || /tmp/dedup.sh -d
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/zsh
|
||||
# Deduplicate Documents
|
||||
dox=$(realpath $DATA/3-*)
|
||||
echo "Hardlinking:"
|
||||
dedup --max-depth=9 -c sh:handler=hardlink "$dox" "$@"
|
||||
dedup --max-depth=9 "$dox" "$@"
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/zsh
|
||||
# Deduplicate Images
|
||||
img=$(realpath $DATA/4-*/images)
|
||||
#find -type f -not -name '*.xmp' | rmlint -k - // pictorials
|
||||
dedup --max-depth=9 -k $img $img/[a-z]*/ // $img/pictorials/stockicons/ $img/**/*.xmp "$@"
|
|
@ -1,8 +1,20 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/sh
|
||||
# Move common files into their place from the downloads folder.
|
||||
dow=$DATA/5-*/download
|
||||
rmlint --rank-by=l -o pretty -o sh:/tmp/dow.sh *.*
|
||||
printf "Enter to confirm, any text to skip. "
|
||||
d5=$DATA/5-*
|
||||
dow=$d5/download
|
||||
|
||||
# Internal Duplicates
|
||||
rmlint --rank-by=Olam -o pretty -o sh:/tmp/dow.sh $dow/*.*
|
||||
printf "Enter to confirm, any text to skip (answer does not matter if nothing is printed above this). "
|
||||
read -r answer
|
||||
test -n "$answer" || /tmp/dow.sh -d
|
||||
|
||||
# Songs
|
||||
mv -v -- $dow/*.mp3 $dow/*.flac $dow/*.wav $MUSIC/
|
||||
mv -v -- $dow/*.iso $DATA/4-*/flash/
|
||||
|
||||
# Data-dir duplicates
|
||||
rmlint --keep-all-tagged --max-depth=5 --rank-by=Odlam -o pretty -o sh:/tmp/dow.sh $d5 // $DATA/1-* $DATA/2-* $DATA/3-* $DATA/4-*
|
||||
printf "Enter to confirm, any text to skip (answer does not matter if nothing is printed above this). "
|
||||
read -r answer
|
||||
test -n "$answer" || /tmp/dow.sh -d
|
||||
|
|
Loading…
Reference in New Issue