Asked • 05/16/19

How to find encoding of a file in Unix via script(s)?

I need to find the encoding of all files that are placed in a directory. Is there a way to find the encoding used? The `file` command is not able to do this. The encoding that is of interest to me is:ISO-8859-1. If the encoding is anything else, I want to move the file to another directory.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.