---
title: "File differencing"
description: "Checksum and line-by-line comparison of files that changed."
product: "Guardian"
edition: "Classic"
type: "overview"
url: "https://docs.cloudhouse.com/guardian/classic/inventory/monitored/configuration-differencing/file-differencing/"
---
# File differencing

Checksum and line-by-line comparison of files that changed. File differencing is especially usually for tracking changes over time and ensuring data consistency.

Applies to: `Guardian Classic`

## Checksum difference

A checksum is a value calculated from file content data that is used to detect differences and ensure data integrity. To see the checksum comparison of two files, select the file you want to compare in the **Monitored** tab (**Inventory** > **Monitored**), according to your own node selection. The selection can be between two different nodes, scans, or files.

![Checksum comparison](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/inventory/monitored/checksum-comparison.png)

The **Checksum** item is displayed in the right panel alongside other file details. The image above shows the comparison between the same file that exists in two nodes. However, you can use the **Scans** and **Compare to** drop-down menus to make other combinations of configurational differences according to other nodes, scans, or files. For more information, see [Configuration Differencing](https://docs.cloudhouse.com/guardian/classic/inventory/monitored/configuration-differencing/configuration-differencing/index.md).

![Scans and compare to dropdown menus](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/inventory/monitored/scans-and-compare-to-dropdown-menus.png)

Besides comparing the checksum of two files, Guardian offers you a more detailed comparison of the differences detected. For more information, see below.

## File Difference

In the **Monitored** tab (**Inventory** > **Monitored**), the **File Difference** functionality displays a side-by-side comparison of the contents of two files where you can see exactly which change(s) were detected. The comparison can be between two different nodes, scans, or files. Once a change is detected, the **View File Diff** button is displayed next to the file you specified. The following image displays the comparison between the same file (`Web.config`) present in two nodes (`IIS-PROD01` and `IIS-PROD02`). For more information on how to enable this functionality, see below.

![File diff page](https://docs.cloudhouse.com/guardian/classic/assets/images/guardian/inventory/monitored/file-diff-page.png)

### Dependencies

To use the **File Difference** functionality, you'll need:

- A set of regular or directory nodes. You can use existing or brand-new nodes for the purpose of file differencing. In the case of brand-new nodes, ensure the details of the file you want to compare are added. For more information, see [Add Nodes](https://docs.cloudhouse.com/guardian/classic/inventory/add-nodes/add-nodes/index.md).

    !!! tip

        Using Linux or Windows directory nodes gives you a quick and clear view of the differences detected, as directory node scans only display files and directories, and regular scans display all categories within a node, such as groups, packages, users, and so on. For more information on how to set directory nodes, see [Directory Node](https://docs.cloudhouse.com/guardian/classic/inventory/add-nodes/add-a-single-node/agentless/directory-node/index.md).

- Text file(s) you want to compare listed in the **Scan Options** for the associated node group, with the **Contents** checkbox selected. Selecting the **Contents** checkbox enables Guardian to read the raw contents of the file for the purpose of change detection and file differencing. For more information on how you can add or edit files, see [Scan Options](https://docs.cloudhouse.com/guardian/classic/inventory/monitored/scan-options/scan-options/index.md).

The following topics describe different types of comparisons you can make in Guardian using the **File Difference** functionality:

!!! note

    The instructions below can be applied to both regular nodes or Linux and Windows directory nodes.

- [File Differencing – Two Scans of the Same File](https://docs.cloudhouse.com/guardian/classic/inventory/monitored/configuration-differencing/file-diff-two-scans/index.md).
- [File Differencing – Two Nodes that Have the Same File](https://docs.cloudhouse.com/guardian/classic/inventory/monitored/configuration-differencing/file-diff-two-nodes/index.md).
- [File Differencing – Two Files on the Same Node](https://docs.cloudhouse.com/guardian/classic/inventory/monitored/configuration-differencing/file-diff-two-files/index.md).
