I wanted to ask if there is a command in Linux that can check recursively for two folder's contents and generate an output of the differences.
What I need is a command that only compares the file name and structure of it and not the contents of each file. The reason for this is that I just backed up 2TB worth of data on different occasions and guarantee that all the data retained its integrity and have the same contents, but I want to check if I copied all the back-ups to see if I have missed one (It is hard to manually check 5000 folders).
Here is a little sample
/dir1 --> turtle.pdf banana_folder chicken.leg
/dir2 --> turtle.pdf banana_folder
I have used the diff command with the -qr and -r arguments but it takes too long just to traverse the files, which I feel it does not only check the structure and file name (Tested on a folder with 10 4GB files)
My limitations are that I can only use a command line since I cannot transfer the drive nor enter the GUI of the linux environment
you can just diff the lists obtained with find:
find dir1 | sort > list1.txt
find dir2 | sort > list2.txt
diff list1.txt list2.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With