remove links with normal rm
This commit is contained in:
@@ -6,7 +6,7 @@ function helpexit() {
|
||||
echo This command is always recursive to folders!
|
||||
echo '-f Do not ask questions'
|
||||
echo '--nc Do not count files first'
|
||||
echo '--shred Use "shred -u" instead of rm'
|
||||
echo '--shred Use "shred -u" instead of rm. WARNING: modifies hardlinked files!'
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -38,7 +38,11 @@ function deletefiles() {
|
||||
[[ $files -ne 0 ]] && percent=$((200*$i/$files % 2 + 100*$i/$files))
|
||||
printf "\r%02d:%02d:%02d %6d/%d %3d%% %s\033[0K" \
|
||||
$(($SECONDS/3600)) $(($SECONDS%3600/60)) $(($SECONDS%60)) $i $files "$percent" "$line"
|
||||
$RMCOMMAND $RMFORCE "$line"
|
||||
if [ -L "$line" ]; then
|
||||
rm $RMFORCE "$line"
|
||||
else
|
||||
$RMCOMMAND $RMFORCE "$line"
|
||||
fi
|
||||
done < <(find "$@" \( -type f -or -type l \) -print0)
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user