本文介绍了在Linux文件系统上查找非UTF8文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一些隐藏在我的LANG = en_US:UTF-8文件系统中的文件,这些文件已经被上传了不可识别的字符在他们的文件名。 我需要搜索文件系统并返回至少有一个字符不在标准范围内的所有文件名(a-zA-Z0-9和。-_等等) 我一直在试图追随,但没有运气。 。 | egrep [^ a-zA-Z0-9_ \\\\\\\\\] 干杯, AP。解决方案 convmv 可能对你很有意思。它不只是找到这些文件,而且还支持将它们重命名为正确的文件名(如果它可以猜测出了什么问题)。O/S = Fedora Code 9.I have a number of files hiding in my LANG=en_US:UTF-8 filesystem that have been uploaded with unrecognisable characters in their filename.I need to search the filesystem and return all filenames that have at least one character that is not in the standard range (a-zA-Z0-9 and .-_ etc.)I have been trying to following but no luck.find . | egrep [^a-zA-Z0-9_\.\/\-\s]All suggestions would be welcome.Cheers,AP. 解决方案 convmv might be interesting to you. It doesn't just find those files, but also supports renaming them to correct file names (if it can guess what went wrong). 这篇关于在Linux文件系统上查找非UTF8文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 13:32