---
title: 'Command what find and clear nasty BOM'
url: 'https://n14.ru/2013/06/05/command_what_find_and_clear_nasty_bom'
markdown: 'https://n14.ru/2013/06/05/command_what_find_and_clear_nasty_bom.md'
lang: ru
date: '2013-06-05'
description: "What about this one\_simple command which not\_just finds but\_clears nasty BOM? :) find . -type f\_-exec sed\_'1s/^\\xEF\\xBB\\xBF//' -i.bak {} \\; -exec rm\_{}.bak \\; I\_love &#147;find&#148; :) If\_you want just to\_show BOM\_files, use\_this one: grep…"
taxonomy:
  category:
    - blog
    - 'Всяко разно'
  archives_month:
    - jun_2013
  archives_year:
    - '2013'
---

# [Command what find and clear nasty BOM](https://n14.ru/2013/06/05/command_what_find_and_clear_nasty_bom)

   05.06.2013  

What about this one simple command which not just finds but clears nasty BOM? :)

find . -type f -exec sed '1s/^\\xEF\\xBB\\xBF//' -i.bak {} \\; -exec rm {}.bak \\; I love &#147;find&#148; :)

If you want just to show BOM files, use this one:

grep -rl $'\\xEF\\xBB\\xBF' .

[source](http://stackoverflow.com/a/2858757)

---

## Navigation

- Parent: [n14.ru](https://n14.ru/index.md)
- Previous: [Yes I'm limited VI by Leaether Strip](https://n14.ru/2013/07/06/yes_im_limited_vi_by_leaether_strip.md)
- Next: [не важно](https://n14.ru/2013/04/26/ne_vazhno.md)
