Questions tagged [file-comparison]
The file-comparison tag has no summary.
146 questions
0
votes
1
answer
51
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
73
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
159
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
302
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 ...
4
votes
4
answers
415
views
Awk- Compare Numbers from Two Files and write Differences in New File
I have two lists with item numbers and want to mark the difference between these lists by writing the numbers wich aren't in both files in a new file.
Both Files have the item number in column 2 and ...
1
vote
1
answer
139
views
Watch a folder for new folders, cd into folder (and subfolders) and execute script
I have a lot of audio files to convert and I like this to happen automatically when moving a folder with files into another folder, where the magic should happen.
It's on a debian system.
Any help ...
0
votes
0
answers
72
views
Help with creating a bash code to compare two different files
I'm currently encountering some challenges while working on a bash script in the Linux terminal to perform the following tasks:
Compare the values in the third column of two different files line by ...
0
votes
1
answer
784
views
Best way to compare/diff two big directories that are backups (by `rsync -aAX`) of a boot partition from another computer?
[ EDIT:
Answered my own question.
Used unison and some hacky post-processing
(
copy-pasted the log output of unison,
tweaked it in my text-editor with multi-selection editing,
then did some shell ...
1
vote
1
answer
57
views
How to generate a list of daily changes to my notes?
Background:
I use Obsidian to organize my notes as I study. It's an application which works "on top of" a collection of markdown formatted plain text files and then shows the links and ...
1
vote
1
answer
3k
views
ansible comparing all files in 2 directories and printing the difference
I have 2 directories
$ tree dir{1..2}
dir1
├── file1
└── file2
dir2
├── file1
└── file2
I want to compare all files in dir1 with all files in dir2 using ansible
and print differences like this
output:...
0
votes
1
answer
80
views
Can i skip a pattern and also print that pattern along with line by line file comparison using awk?
I have the code below (please see Need to understand below awk command to find missing lines in a file):
awk 'NR==FNR{a[$0];next}(!($0 in a)){print}' 1.txt 2.txt
Can I add one more condition to skip ...
1
vote
3
answers
569
views
Compare directories ignoring time differences of 1h +- 2s
I often want to synchronize my Music folders between my Android mobile phone and my Linux PC. The files on my phone are stored on an SD card using FAT32 and can come from either my Windows laptop or ...
1
vote
1
answer
555
views
How to calculate a single checksum for each folder in a directory?
I am comparing two large directories between a server and a client machine. I run a command similar to the one below to determine if the two directories are the same or not.
find /path/to/dir/ -type f ...
-3
votes
2
answers
1k
views
How to get difference of two csv files by columns and write diff into 3rd file?
I have two csv files like this;
422174,XN,20.99,2020-09-01,2022-01-20 20:20:28.613+00
421348,SB,21.99,2021-01-26,2022-01-20 20:20:28.613+00
885176,XN,41.80,2021-11-17,2022-01-20 20:20:28.613+00
881751,...
-1
votes
2
answers
144
views
compare the two files
Please suggest how can we compare two files having major part similar but in a jumbled way.
example:
A file has
72444 55555
72445 55666
55666 72446
B File has
72444 55555
55666 72446
72445 55666
...