tldr/pages/windows/comp.md

33 lines
686 B
Markdown
Raw Normal View History

2018-11-19 12:52:12 +03:00
# comp
> Compare the contents of two files or sets of files.
> Use wildcards (*) to compare sets of files.
- Compare files interactively:
`comp`
- Compare two specified files:
`comp {{path/to/file_1}} {{path/to/file_2}}`
- Display differences in decimal format:
`comp /d {{path/to/file_1}} {{path/to/file_2}}`
- Display differences in ASCII format:
`comp /a {{path/to/file_1}} {{path/to/file_2}}`
- Display line numbers for differences:
`comp /l {{path/to/file_1}} {{path/to/file_2}}`
- Use a case-insensitive comparison:
`comp /c {{path/to/file_1}} {{path/to/file_2}}`
- Compare only the first 5 lines of each file:
`comp /n={{5}} {{path/to/file_1}} {{path/to/file_2}}`