You can use diff –ignore-file-name-case option to ignore cases when comparing file names.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
## ignore case when comparing file names mkdir mydir{1,2} ## create some files and directories echo "hello" > mydir1/myfile1 echo "hello" > mydir2/MYFILE1 diff mydir1 mydir2 ## treats myfile1 and MYFILE1 as different files ## returns ## Only in mydir2: MYFILE1 ## Only in mydir1: myfile1 diff --ignore-file-name-case mydir1 mydir2 ## myfile1 and MYFILE1 are treated as same file ## returns nothing and content is same in both the file rm -r my* |