chiark / gitweb /
Add detect-hardlinks.sh script
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 9 Jul 2015 01:10:10 +0000 (21:10 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 9 Jul 2015 01:10:10 +0000 (21:10 -0400)
detect-hardlinks.sh [new file with mode: 0755]

diff --git a/detect-hardlinks.sh b/detect-hardlinks.sh
new file mode 100755 (executable)
index 0000000..fc4a0ee
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd $HOME/termux
+
+for f in *; do
+       cd $HOME/termux
+       if [ -d $f/massage ]; then
+               cd $f/massage
+               if [ -n "$(find . -type f -links +1)" ]; then
+                       echo "$f contains hardlink"
+               fi
+       fi
+done