Files
cheatsheet-tldr/tldr/windows/comp
2024-10-04 00:17:00 +00:00

43 lines
936 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# comp
> Compare the contents of two files or sets of files.
> Use wildcards (*) to compare sets of files.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/comp>.
- Compare files interactively:
`comp`
- Compare two specified files:
`comp {{path o ile1}} {{path o ile2}}`
- Compare two sets of files:
`comp {{path o\directory1}}\* {{path o\directory2}}\*`
- Display differences in [d]ecimal format:
`comp /d {{path o ile1}} {{path o ile2}}`
- Display differences in [a]SCII format:
`comp /a {{path o ile1}} {{path o ile2}}`
- Display [l]ine numbers for differences:
`comp /l {{path o ile1}} {{path o ile2}}`
- Compare files [c]ase-insensitively:
`comp /c {{path o ile1}} {{path o ile2}}`
- Compare only the first 5 lines of each file:
`comp /n=5 {{path o ile1}} {{path o ile2}}`