UnixTools/hardlink_break.sh
2013-03-21 01:54:15 +01:00

16 lines
373 B
Bash
Executable File

#!/bin/bash
#cat hardlinked.lst | while read file; do
for file in "$@"; do
if [ ! -f "$file" ]; then
echo "ERROR: $file not found."
continue
fi
echo -n "File: $file ... "
mv "$file" "${file}-breaking"
echo -n "Moved ..."
cp "${file}-breaking" "$file"
echo -n "Copied ..."
rm "${file}-breaking"
echo "Cleanup. DONE."
done