Questions tagged [diff]
diff is a shell command to find differences between two files. It is common on all *nix based systems
299 questions
0
votes
2
answers
43
views
How can I find what files differ from corresponding files in a larger set?
I have two sets of files, each set in its own directory. The files in directory subset/ are a subset of those in superset/.
superset/ subset/
apple.txt banana.txt
...
5
votes
4
answers
2k
views
How does this standard input operator (0<) work in Linux?
Assuming there are two files in Linux. FileA and FileB both with some different list of fruits. I apply the below commands.
diff fileA fileB > file.diff
Next, I execute the below command
patch ...
0
votes
1
answer
88
views
Is there a way to fallback upon git-diff-external failure, or a way to manually invoke the built-in git-diff?
I'm using an external tool for diffing; but I'd like to establish a safe fallback for systems where that tool isn't installed.
I can wrap the call to my external difftool in a script that checks for ...
1
vote
3
answers
4k
views
The safest way to check if files are identical
I'm looking for a command line tool to check if files are the same or not, I know there are "fc" and "comp" but I'm not sure which is better or if they are safe or not.
I have ...
0
votes
1
answer
203
views
How to compare two file systems... diff doesn't work?
I have a linux system on a micro-SD card which is acting strangely. I want to see which files have changed since I imaged the card from an image file. So, I mount the image file linux partition as /...
1
vote
0
answers
239
views
Automated way to compare similar text columns in Excel?
I am happy to join you here.
I have an excel sheet that contains thousands of rows, and there is two columns that contains similar text, sometimes identical, and sometimes long.
What I need is a way ...
2
votes
1
answer
148
views
Cygwin bash script file fails silently
I have a script file that uses rsync for backup, then compares the two directory trees using diff. diff seems to find all the differences correctly - it matches what WinMerge finds. But when there ...
0
votes
0
answers
130
views
How to compare TIFF files with fields tagged 37680 (0x9330)?
Let's assume two TIFF files which are probably the same except their tags (according to a Web search) “MSPropertySetStorage” / “OLE Property Set Storage”:
$ ls -l f1.tif f2.tif | cut -d ' ' -f 5,11
...
1
vote
0
answers
130
views
How to command pv (Pipe Viewer) to work with diff?
using:
OS: Kubuntu 22.04.3 LTS x86_64
diff (GNU diffutils) 3.8 Copyright (C) 2021 Free Software Foundation, Inc.
pv 1.8.0 Copyright 2023 Andrew Wood, pv = Pipe Viewer
commands to display above:
...
2
votes
1
answer
856
views
On Linux, how can one diff directories, excluding files by name, but including directories of the same name?
Consider the following dir/file structure (all leaf nodes are regular files, not that it really matters):
$ tree
.
├── cool_1
│ ├── dumb
│ │ ├── file1
│ │ └── file2
│ └── foo
│ └── ...
0
votes
1
answer
4k
views
exclude all directories and subdirectories from du/diff command in calculations
I would like to find difference in bytes in files.
However, du/diff command with -a list also directories and subdirectories.
I want only the files in subdirectories and directories, not these ones.
I ...
2
votes
0
answers
1k
views
How reliable is diff?
I copied a large directory from one volume to another (using rsync) and subsequently wanted to check whether the copy was indeed correct to verify the integrity of the data. To avoid the lengthy file ...
-1
votes
2
answers
3k
views
TortoiseGit: How to show files with differences between branches before merging
Merging in TortoiseGit will automatically merge a file to the latest code if there are no conflicts.
However, I'd like to choose some blocks to merge only (the files don't conflict). Is it possible to ...
0
votes
1
answer
283
views
borg backup is processing all files instead of modified
please advise how to correctly make borgbackup to process and copy only modified source files and their diffs to destination?
every week we make our data snapshot in cephfs:
/data/.snap/snap1/
/data/....
0
votes
0
answers
310
views
How to remove the "+" and "-" after a diff comparison
I compare 2 files using Cygwin (MobaXterm) diff.
Output files have -- a and ++ b lines at the first line. I want to delete only these lines. How could I do it?
Here's my script:
#! /bin/bash
sort -...