From 041bcd2f6316b9da317ebdb26e0f0bd446a19a20 Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Wed, 2 Apr 2014 11:12:09 +0200 Subject: [PATCH] [FIND] add a cheat to find all files that have the same node (hard link) as MY_FILE --- cheatsheets/find | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cheatsheets/find b/cheatsheets/find index c6126b3..5cd262f 100644 --- a/cheatsheets/find +++ b/cheatsheets/find @@ -39,3 +39,6 @@ find . -maxdepth 2 -name build -type d # To search all files who are not in .git directory find . ! -iwholename '*.git*' -type f + +# Find all files that have the same node (hard link) as MY_FILE_HERE +find / -type f -samefile MY_FILE_HERE 2>/dev/null