Sponsored Content
Top Forums UNIX for Beginners Questions & Answers UNIX utility to find difference in folder, file and contents of file against a base version Post 302985939 by drl on Thursday 17th of November 2016 07:14:09 AM
Old 11-17-2016
Hi.

I'd start with cmptree, from the following list of possibilities.
Code:
cmptree Compare directory trees recursively and report the differences. (what)
Path    : ~/bin/cmptree
Length  : 183 lines
Type    : Bourne-Again shell script, ASCII text executable
Shebang : #!/bin/bash

Possibilities:
Code:
Difference, similarity, compare

        1) diff, standard

        2) cmp, standard

        3) dwdiff, cdif (local), word differences

        4) cmptree (local), dirdiff (GUI), compare directory trees
           http://www.drdobbs.com/the-shell-corner-cmptree/199103123 (2016.11)

        5) docdiff, compare by character, word, line, numerous output formats

        6) meld (GUI), diff and merge files

        7) numdiff, my-ndiff (local), snd (local), compare numerically

        8) comm, standard, compare 2 sorted files, 3 column output

        9) comm-split (local), compare like comm, but split output to
           separate files.

        10) multi-comm (local), compare n files, need not be sorted

        11) contrast (local), like comm, needs no sort, symmetric and
        simple differences, intersection, union

        12) diff.pl, perl work-alike for diff
            https://metacpan.org/pod/distribution/PerlPowerTools/bin/diff

        13) multi-diff (local), common lines, multiple files, re-write omitting common lines

        14) psame (local), find similarity between 2 text files

        15) fdupes, rdfind, duff, find duplicate files

        16) dateutils.ddiff, find difference in dates, times

In this environment:
Code:
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution        : Debian 8.6 (jessie)

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to compare the difference between a file and a folder??

Hi, I have a .txt file which has to be compared with a folder and print the difference to some other .txt file. I did try with the diff command..i mean diff /tmp/aaa/bbb.txt /space/aaa/bbb/ /***bbb.txt contains all the files names which may or may not exist in the folder bbb..so i need... (2 Replies)
Discussion started by: kumarsaravana_s
2 Replies

2. HP-UX

how to redirect the growing contents of log file to another file in unix

how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies

3. UNIX for Dummies Questions & Answers

Disk Usage in GB and Unix command to find the biggest file/folder

Hi All, Please help me out 1) Command to find the disk usage in GB. I know that du -k will give in kilobites. 2) How to find the Biggest file/folder in a given set of files/folders. Thanks in advance Regards, Manas (8 Replies)
Discussion started by: manas6
8 Replies

4. Shell Programming and Scripting

Search through subfolders and move them into separate folder on the base of file size

Hello guys I am sure that you will help me on this issue as you did earlier::) Scenario : I have a folder named "XYZ". It consist many sub-folders and subfolder contain severals files. there may be abc.dat in each subfolder. Now i want to seperate subfolders on follwing conditions- if abc.dat... (12 Replies)
Discussion started by: infiant
12 Replies

5. UNIX for Dummies Questions & Answers

Help with folder and file difference

Hello, I was wondering how to make difference between file and folder while using ls -l? I see it on the output because "d" is for dir and "-" for file, but how to make this input to other command? Because I am trying to bzip2 if it's the file and tar if it's a directory. (9 Replies)
Discussion started by: juzt1s
9 Replies

6. UNIX for Dummies Questions & Answers

find lines in another file based on contents in a second file

Hello, I have a file with tab delimited columns like: File1 A 2 C R F 4 D Q C 9 A B ...... I want to grep out the lines in a second file, File2, corresponding to each line in File1 Can I do this: while read a b c d do grep '$a\t$b\t$c\t$d' File2 >>... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

7. UNIX for Dummies Questions & Answers

Replacing a particular string in all files in folder and file contents

I need to replace all filesnames in a folder as well as its content from AK6 to AK11. Eg Folder has files AK6-Create.xml, AK6-system.py etc.. the files names as well as contents should be changes to AK9-Create.xml, AK9-system.py etc All files are xml and python scripts. ---------- Post... (0 Replies)
Discussion started by: Candid247
0 Replies

8. Shell Programming and Scripting

How to copy all the contents of a list of files present in a folder to a particular file?

Hi All, I want to copy all the contents of a list of files in a folder to a particular file. i am using following command: cat dir/* >> newFile.txtIt's not working. Could you please help? Thanks, Pranav (3 Replies)
Discussion started by: Pranav Bhasker
3 Replies

9. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

10. UNIX for Beginners Questions & Answers

awk code to find difference in second file which is not present in first file .

Hi All, I want to find difference between two files and output only lines which are not present in second file .I am using awk and I am getting only the first difference but I want to get all the lines which are not present in file2 .Below is the code I am using . Please help to get the desired... (7 Replies)
Discussion started by: srinivasrao
7 Replies
NEW(1)                                                               [nmh-1.5]                                                              NEW(1)

NAME
new - report on folders with new messages fnext - set current folder to next folder with new messages fprev - set current folder to previous folder with new messages unseen - scan new messages in all folders with new messages SYNOPSIS
new [sequences] [-mode mode] [-folders foldersfile] [-version] [-help] fnext is equivalent to new -mode fnext fprev is equivalent to new -mode fprev unseen is equivalent to new -mode unseen DESCRIPTION
New in its default mode produces a one-line-per-folder listing of all folders containing messages in the listed sequences or in the sequences listed in the profile entry "Unseen-Sequence". Each line contains the folder, the number of messages in the desired sequences, and the message lists from the .mh_sequences file. For example: foo 11.* 40-50 bar 380. 760-772 824-828 total 391. The `*' on foo indicates that it is the current folder. The last line shows the total number of messages in the desired sequences. New crawls the folder hierarchy recursively to find all folders, and prints them in lexicographic order. Override this behavior by provid- ing foldersfile containing the pre-sorted list of folders new should check, one per line. In fnext and fprev modes, new instead changes to the next or previous matching folder, respectively. In unseen mode, new executes scan sequences for each matching folder. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Unseen-Sequence: The name of the unseen message sequence SEE ALSO
scan(1), mh-format(5) HISTORY
Based on Luke Mewburn's new (http://www.mewburn.net/luke/src/new). MH.6.8 11 June 2012 NEW(1)
All times are GMT -4. The time now is 04:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy