Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
174 views

Unix or Linux command to compare binary files [duplicate]

I'm looking for a command that compares binary files. Of course, I know about diff, but it is not very good at binaries. I have two files from a error-prone source (scratched dvd) which should be ...
Gyro Gearloose's user avatar
0 votes
0 answers
64 views

How to diff command outputs in vim

I tried vim -d <(ffprobe one.mp4 2>&1) <(ffprobe two.mp4 2>&1) to see the difference between the two videos' codecs etc., but vim doesn't show anything when it opens, just an empty ...
user avatar
0 votes
1 answer
55 views

diff and comm are not finding difference between two env files

I have this env file 1.env contents: BARF_BAG=1 then another env file: 2.env contents: BARF_BAG=2 I run comm and diff on the files to see the difference: #!/usr/bin/env bash ( set -e; ...
Alexander Mills's user avatar
0 votes
1 answer
63 views

Group results using comm

Using comm I get results that look weird from this: comm -3 <(. "$first_env_file"; env) <(. "$second_env_file"; env) I get something like: AUTH_LP_ACCOUNT_ID=xxx1 ...
Alexander Mills's user avatar
1 vote
1 answer
960 views

diffing two .env files

I have two env files, let's say x.env and y.env, the order of the variables is different, but the content could be the same but likely different. Is there some tool I could use to diff the variables? ...
Alexander Mills's user avatar
-1 votes
1 answer
105 views

Complicated DIFF method

I'm trying to do a compare between a config from an old box and a new box to verify Availability and State haven't changed. I have a file that is generated with about a thousand nodes but every node ...
MyWiseGuys's user avatar
0 votes
1 answer
507 views

How to use sed to remove letters, numbers, spaces, hyphens from the same linux string

I am trying to create a script to monitor a web page and send a telegram notification whenever there is a change in that page, I am using diff to accomplish this task. The script seems to work well ...
Doom's user avatar
  • 1
6 votes
4 answers
5k views

How to merge two folders so as to remove identical files from one, while keeping checksummed differentials?

I have a scenario where I have a recovery from a drive from possibly a different point in time that is not only potentially different in terms of files being present, but also there was some ...
ylluminate's user avatar
7 votes
3 answers
11k views

I want to compare values of two files, but not based on position or sequence

Suppose that I have the two files with the following content: $ cat File1.txt Apple orange watermelon avocado lime $ cat File2.txt orange Apple lime watermelon avocado Basically, there is no ...
ansinha's user avatar
  • 85
-4 votes
1 answer
74 views

i want a linux script that will be able to compare both files and after comparing it should display something

file 1 products total apple 6 yam 5 fish 6 meat 3 file2 products total apple 6 yam 7 ...
bob's user avatar
  • 1
0 votes
1 answer
682 views

Can I use `diff` to display not the different but the matching parts?

man diff says: diff - compare files line by line So diff will compare the files. However, eventually, it will show the difference, if there is any. How can I compare the files and show the matching ...
finefoot's user avatar
  • 3,554
6 votes
3 answers
2k views

Diff with file titles printed out

I was wondering if there is way when the result is yelded from diff, to print the file names on top of the columns. Currently I get this ; diff -a --suppress-common-lines -y output_main.txt ...
Laure's user avatar
  • 61
2 votes
1 answer
7k views

Using diff / patch to create a new file inside a directory

I'm learning about diff/patch and I don't understand why the patch file created by the command sequence below doesn't create the file create_me.txt inside the Org directory when I try to apply it. ...
Blink's user avatar
  • 23
1 vote
1 answer
298 views

How to see which files are identical given a list of files in two projects

I have two projects named project1 and project2 with identical file trees as follows. project1/, project2/ . ├── src │ ├── index.html │ ├── main.js │ ├── normalize.js │ ├── routes │ │ ├──...
Mowzer's user avatar
  • 1,049
1 vote
3 answers
3k views

Linux equivalent of windows cmd command

I'm migrating to Linux, and I need to convert the following Windows cmd command: fc file1.txt file2.txt | find /i "no se han encontrado diferencias" > nul && set equal=yes I think fc can ...
kurokirasama's user avatar

15 30 50 per page