Skip to main content

All Questions

Tagged with
1 vote
0 answers
57 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: ...
joseph22's user avatar
  • 367
1 vote
1 answer
196 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 │   └── ...
SirPentor's user avatar
  • 119
4 votes
2 answers
11k views

Best way to compare two very large directories in Linux

I need to compare two directories on Linux filesystems on two separate servers in order to identify whether all the files from SERVER1 are present on SERVER2. The total data set is about 4TB of files ...
btongeorge's user avatar
0 votes
1 answer
179 views

Get the changes before and after a script run in linux (based on date and or size)

Given a directory with a tree of directories and files inside of it, presumably containing log files. How to know which files got changed after running a specific application. Taking into ...
weshouman's user avatar
  • 243
3 votes
2 answers
765 views

Diff tool for finding a minimal set of changes

I have two versions of a text file, with many changes (including whitespace, linebreak differences, etc.). All of the diff tools I have tried (diff, diff --minimal, wdiff, kdiff3, meld) fail ...
John Pardon's user avatar
7 votes
1 answer
468 views

Why is GNU diff such a memory hog? [closed]

There are enough questions asking how to diff large files, as diff can't handle them. I'd like to know why GNU diff can't handle them. I did a tiny experiment. I diffed two identical datasets, ...
nyov's user avatar
  • 325
2 votes
3 answers
3k views

How to diff three binary files to show only what changed between 1 and 2 and then changed back between 2 and 3?

I have three binary files (memory dumps). Call them file1, file2, file3. I'm trying to debug some software, and I'm toggling a switch. file1 = switch off file2 = switch on file3 = switch off I need ...
authur1234's user avatar
1 vote
0 answers
158 views

vimdiff show differences with only parent rows

Two config files contain many blocks of the form block name { ..... sub block name1 { ......... sub block name2 { .... } } ..... } Example: Input (LHS) : ltm ...
itsraja's user avatar
  • 103
0 votes
0 answers
68 views

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval?

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval? Hi, I have a folder (A) with a large number of subfolders. I want to ...
Vesa's user avatar
  • 428
0 votes
2 answers
2k views

How to do a line insensitive difference (diff) in linux?

I have two text files where the order of lines does not matter. I want to find out the lines that are different in one file to the other. Using diff in linux finds the difference but also accounts for ...
pnkjmndhl's user avatar
  • 132
5 votes
1 answer
4k views

Ignore line endings when using Rsync

I want to sync two directories. The first one has CRLF and normal line endings, the second directory also has files with CRLF and normal line endings. The problem is, when I execute this code: ...
Sergio's user avatar
  • 153
1 vote
2 answers
2k views

Comparing two large files in Linux without exhausting memory

I am using diff file1 file2 and getting memory exhausted exception. file1 and file 2 are 10 GB each. I tried diff --speed-large-files file1 file2 but that didn't work. How can I compare two files ...
Crazywolf's user avatar
0 votes
1 answer
70 views

diff on contents of a file

i'm trying to do a diff on two files and compare the contents and if they are different send an email. Below is my script that I cannot get to work for some reason. Any suggestions are welcome. #!/...
Unix4fun's user avatar
5 votes
1 answer
818 views

Is there a ZFS-aware diff?

I often make snapshots of a ZFS volume (containing AOSP) make some changes (often extracting ZIP files over then top, or running scripts) and then run diff to see what has changed. This is really ...
fadedbee's user avatar
  • 195
2 votes
1 answer
3k views

bash: why use "treat all files as text" flag with the diff command?

I see a few examples when using the diff command, particularly using it recursively for checking whole directories, to use "diff -ar foo/ foo2/". If I'm checking a bunch of mixed files (some text, ...
bitofagoob's user avatar

15 30 50 per page
1
2 3 4 5