Hacker News new | past | comments | ask | show | jobs | submit login

The cmp in coreutils understands:

  -n, --bytes=LIMIT   compare at most LIMIT bytes
so head is not really necessary:

  find . -name '*.csv' -type f -exec cmp -sn 3 {} bom.dat \; -print
Using -exec as a filter is a nice feature more people should use. That -type was put there just to avoid directories.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: