Linux command
isutf8 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Check if file is valid UTF-8
isutf8 [file]
Check multiple files
isutf8 [file1] [file2] [file3]
Quiet mode (exit code only)
isutf8 -q [file]
List invalid files only
isutf8 -l [files...]
说明
isutf8 checks whether files contain valid UTF-8 encoded text. Part of the moreutils package. Returns exit code 0 if valid UTF-8, 1 if invalid. Useful in scripts to validate file encoding before processing.
参数
- -q, --quiet
- No output, only exit code.
- -l, --list
- List files that are not valid UTF-8.
- -h, --help
- Show help.
FAQ
What is the isutf8 command used for?
isutf8 checks whether files contain valid UTF-8 encoded text. Part of the moreutils package. Returns exit code 0 if valid UTF-8, 1 if invalid. Useful in scripts to validate file encoding before processing.
How do I run a basic isutf8 example?
Run `isutf8 [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -q, --quiet do in isutf8?
No output, only exit code.