Answer the question
In order to leave comments, you need to log in
(Linux) How to find and delete files with incorrect encoding?
Good afternoon.
There are files whose name consists of an incorrect encoding, they are displayed with question marks, BUT they have a format, for example
????????.doc
file format can be any
, you need to delete such files.
they are not searched for by a question mark, since it is not actually a question mark.
All this business by itself through the Linux console.
Thank you.
Answer the question
In order to leave comments, you need to log in
by inode number, determine the inode (ls -i) and delete by it find . -inum -exec rm -r {} \; or just rm -i ***
From the other side.
Delete any files with non-native encoding in the name.
#!/bin/sh
IFS=$'\n'
for x in $( ls *�* )
do
rm -f $x
echo $x
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question