Results 1 to 2 of 2
Hello everyone
I have a folder and a backup of it from earlier, and I want to compare them, as well as the individual files in them.
Now, if I ...
- 09-30-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 8
diff with files in folders/directories
Hello everyone
I have a folder and a backup of it from earlier, and I want to compare them, as well as the individual files in them.
Now, if I just doI get a list of files that are in one and not the other.Code:diff -r folder1/ folder2/
I want the actual difference between each and every file in each folder and itś subdirectories that are named the same in both of them. Is there a simple way to do this?
Thanks a lot in advance!
- 09-30-2008 #2Just Joined!
- Join Date
- Sep 2008
- Posts
- 8
*Does a little bit more research*
So, if files exist in one and not the other folder, diff will return just just those files (as stated in previous post)
This can be overridden by using the -N flag which tells diff to treat absent files as empty. Therefore, anything in any of the files listed before will all be a difference that is output.
Problem solved!
diff -r -N folder1/ folder2/


Reply With Quote