Questions tagged [diff]
diff - Command-line tool to display the differences between two files, or each corresponding file in two directories.
552 questions
0
votes
0
answers
30
views
ubuntu system freeze while diff reading, SysRq REISUB not working
I've experienced total system freeze while checking if files where copied correctly by
diff -rq [INTERNAL HDD] [USB HDD]
This happened twice, always while running the diff. On the second occasion I ...
1
vote
0
answers
44
views
p4merge open each window minimized when running a git diff/ merge
I've asked the question on SO before, but maybe it is better placed here.
I'm running on Ubuntu 24.04.1 LTS (X11) and have p4merge installed in version p4v-2024.3.2656785.
I'm using p4merge since ...
0
votes
1
answer
56
views
How to save changes to patch files for kernel headers in `include/linux` using `diff`?
I am trying to hack the Linux kernel and added/modified some header files in include/linux. However, when I generate patch file using diff like:
diff -uprN -X linux/Documentation/dontdiff \
...
0
votes
1
answer
272
views
How do I compare two docker images?
I have two Docker images, each with many layers. I want to compare all the files in teh first image to all the files in the second one, to see what's been changed.
I tried taring up the images using
...
-1
votes
2
answers
90
views
In bash/zsh, how to compare the metadata in two directories including . and excluding .. and the contents inside subdirectories?
Let's say that in a script, you have a directory $1 and its copy $2 and you'd like to compare the metadata (names, permissions, sizes, full modification dates, …) of the files and directories inside ...
0
votes
0
answers
174
views
diff -qr command between local and remote directories
According to this process substitution can be used to do a SIMPLE diff between local and remote machine. However, I want to use the -qr option in the diff command, i.e., it must be recursive and brief ...
0
votes
1
answer
88
views
How to quickly find the largest files/dirs that differ between two directories that should be identical on Linux?
I'm trying to synchronize two hard drives. I thought most people who don't want to lose any data and don't use RAID would use such a method so that there would be a well-working GUI. That doesn't seem ...
0
votes
1
answer
35
views
check files difference with multiple folders
I would like to check when a file differ inside a backup system using snapshots.
I have several folders with the same architecture inside
ls -1 .snapshot
4-hourly.2024-04-14_0405
4-hourly.2024-04-...
0
votes
1
answer
55
views
How to prevent `diff -rq` from showing newly created files, when comparing the different versions of a folder?
I am doing diff -rq to check the difference between 2 folders (A and B). I don't want to know if folder A has any new files because that's expected. How do I ensure that this information doesn't come ...
0
votes
1
answer
71
views
How can I call git's built-in diff command directly after configuring a different visual "git diff" substitute?
I have configured git diff to be a command that calls substitute diff for viewing file differences i.e /usr/bin/vim -dR "$2" "$3" and that doesn't work when I want to create a ...
0
votes
1
answer
126
views
Performing character-level comparison of "strings" without explicitly creating temporary files for git diff
Referring to this https://stackoverflow.com/a/31356602, I wrote this code:
#!/bin/bash
# Define the two strings to compare
string1="First string with some random text."
string2="Second ...
0
votes
2
answers
204
views
Fast file comparison that displays results side by side with structure understanding (a la total commander in windows)
Is there a way/tool to show differences between two files side by side only highlighting differences in a similar way kdiff3 does that but with a tool that is reasonably fast?A similar question was ...
1
vote
1
answer
721
views
How to use kdiff3 to edit when comparing two files
I'm used to meld for editing while seeing an intra-line diff that's updated live in response to edits. One just types in the left or right pane of the window and then save one or both files.
I'm ...
1
vote
0
answers
93
views
When should I use comm over diff?
It seems diff can do anything comm can do? When should I use comm only but not diff excepting the difference in result format? I guess comm is faster?
2
votes
3
answers
393
views
How to compare two directories recursively, and for each pair of files with the same name, location, and contents, say which file is older?
In a Linux shell, how to compare two directories recursively, and for each pair of files (including symlinks and directories) with the same location (including the name) in the two directories and the ...