K
K
Konstantin2015-06-09 20:31:15
linux
Konstantin, 2015-06-09 20:31:15

How to compare lists of files? linux and windows?

Lately I've been dealing with the search for wickedness on websites. The sites themselves are developed and edited under Windows on a local machine.
I take a snapshot of the site's php files like this - I go via SSH putty

find . -name "*.php*" -not -name "*%%*" | sort > host29.txt

for Windows I also downloaded a set of Linux utilities
with the same command I make a list on the local machine (replace \ with /) so that in the lists all lines are completely identical, just sorting differently for some reason.
But for some reason, the list looks different, out of order, or rather they are in order here and there, but in their own way ... I try to compare with the team
diff -b -B local29.txt host29.txt > diff_pk_local.txt

well, nothing comes out, it comes out more precisely, but it’s not like that,
I think the problem is in sorting, if the files were equally sorted, it would probably work out
Tell me how to compare file lists correctly on different systems, it would also be desirable taking into account hashes

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin, 2015-06-09
@armenka29

))) I figured it out enough to prescribe the -df keys everywhere
and it sorts everything well equally

A
AVKor, 2015-06-09
@AVKor

man sort

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question