Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi. trying to look through some of my files today i encountered a folder that had the contents:
#ls -la made\ in\ USA/
ls: made in USA/<uncopiable filename>: Invalid or incomplete multibyte or wide character
ls: made in USA/<uncopiable filename>: Invalid or incomplete multibyte or wide character
-r-xr-xr-x 1 oliver oliver 2819220071 Mar 8 2021 0???z?<?.?:?
-r-xr-xr-x 1 oliver oliver 1830181302 Mar 7 1925 5?qn??{o.y??
-rwxrwxr-x 1 oliver oliver 153201713 Jan 23 1992 5t?j?z??.?s#
-r-xr-xr-x 1 oliver oliver 3569251187 Nov 1 1946 `67??8?s.?z?
-rwxrwxr-x 1 oliver oliver 75549024 Aug 1 1971 ?7$ne?a.!??
dr-xr-xr-x 0 oliver oliver 4096 Jun 25 2030 ???a?\i?.?m?
-rwxrwxr-x 1 oliver oliver 2105046483 Dec 27 1965 ?`as????.<??
-rwxrwxr-x 1 oliver oliver 724500672 Apr 22 1966 ??`????a.w?o
drwxrwxr-x 0 oliver oliver 4096 Nov 18 1967 b??????6.??k
drwxrwxr-x 0 oliver oliver 4096 Apr 19 2028 b?m&?m??.???
dr-xr-xr-x 0 oliver oliver 4096 Apr 19 1995 ~??c0o??.???
-rwxrwxr-x 1 oliver oliver 2458544824 Jan 19 2008 ??c??e??.wv?
dr-xr-xr-x 0 oliver oliver 4096 Jul 31 1918 ch>??'?".\??
-r-xr-xr-x 1 oliver oliver 509329007 Jan 13 1939 ???c?j}`.(??
-r-xr-xr-x 1 oliver oliver 989844389 Dec 17 1970 c???j?"r.?&?
-r-xr-xr-x 1 oliver oliver 3766570887 Jun 1 1984 ?`??c??y.??p
drwxrwxr-x 0 oliver oliver 4096 Mar 24 1957 <e??"??a.???
-r-xr-xr-x 1 oliver oliver 2863942834 Jan 13 1934 ????????.f@?
-r-xr-xr-x 1 oliver oliver 1218481069 Oct 8 1993 ?f4>?{??.???
drwxrwxr-x 0 oliver oliver 4096 Jan 20 1925 ?????fr8.qgg
drwxrwxr-x 0 oliver oliver 4096 Jun 19 1904 ???f?t6?.8?m
-r-xr-xr-x 1 oliver oliver 2292707523 Dec 23 1901 ?f>??x#?.???
-r-xr-xr-x 1 oliver oliver 2329162805 Apr 2 1933 ????h?f?.?y4
drwxrwxr-x 0 oliver oliver 4096 Mar 30 1960 (???i#??.5??
drwxrwxr-x 0 oliver oliver 4096 Nov 10 1930 ??i??d?w.???
dr-xr-xr-x 0 oliver oliver 4096 Dec 26 1937 ??j??.??
-r-xr-xr-x 1 oliver oliver 3422741682 May 1 1936 ???????j.!??
dr-xr-xr-x 0 oliver oliver 4096 Apr 28 2010 j??+g???.v??
drwxrwxr-x 0 oliver oliver 4096 Jan 4 1944 ??????^?.?jm
drwxrwxr-x 16453 oliver oliver 5394432 Aug 20 1985 #k?6?rq=.h5u
-r-xr-xr-x 1 oliver oliver 918447839 Sep 26 1939 ????kc??.?$g
drwxrwxr-x 0 oliver oliver 4096 Jun 20 1957 ????k?q=.???
-rwxrwxr-x 1 oliver oliver 1142637903 Mar 5 1995 ?????k??.??z
-rwxrwxr-x 1 oliver oliver 3804049525 Mar 6 1921 l?(???ke.o??
dr-xr-xr-x 0 oliver oliver 4096 Dec 19 1914 ?.m??
dr-xr-xr-x 0 oliver oliver 4096 Jan 5 1981 ??m䠠_?.???
-rwxrwxr-x 1 oliver oliver 3731742354 Dec 1 2018 ms????'-.;?\
-r-xr-xr-x 1 oliver oliver 826656510 Jun 19 1911 ??&?????.?,n
drwxrwxr-x 0 oliver oliver 4096 Jun 29 1999 +???n??.?b?
-r-xr-xr-x 1 oliver oliver 4160749327 Nov 28 1917 o@@?!d??.???
-rwxrwxr-x 1 oliver oliver 3415614409 Dec 5 1908 ???o????.jg?
dr-xr-xr-x 0 oliver oliver 4096 Nov 25 1962 ??$?p?[?.?y?
-rwxrwxr-x 1 oliver oliver 475999767 May 31 2004 ??&???^?.r?'
-rwxrwxr-x 1 oliver oliver 3006073754 Jan 6 2023 ???r)d??.???
-r-xr-xr-x 1 oliver oliver 1283654407 Dec 7 1947 ??r???m$.?q?
-rwxrwxr-x 1 oliver oliver 1118637527 Aug 26 1998 ?tr??[d?.?s?
drwxrwxr-x 0 oliver oliver 4096 Aug 22 2033 )?u?????.???
dr-xr-xr-x 0 oliver oliver 4096 Jan 18 2032 %u?||?kt.b?l
-r-xr-xr-x 1 oliver oliver 833382901 Jul 31 1980 }w??????.`??
-r-xr-xr-x 1 oliver oliver 3176439589 Dec 21 1962 ??x?n3?d.?^?
-r-xr-xr-x 1 oliver oliver 311054925 Jul 9 2009 ,?x?r?@+.?c?
-rwxrwxr-x 1 oliver oliver 1350891244 Nov 30 2000 `?.?z?
drwxrwxr-x 0 oliver oliver 4096 Dec 22 1947 z?!?#d?q.??v
drwxrwxr-x 0 oliver oliver 4096 May 4 2025 zmc?\c,?.??
obviously the directory isnt supposed to have all of those garbage files. when i try to rm any of the files or the entire directory (with -rfd options) i get the same rm: cannot remove 'made in USA/<uncopiable filename>: Invalid or incomplete multibyte or wide character error over and over again.
I dont really care about saving the directory or anything. i really just want to remove this.
sure did.
rm -rf made\ in\ USA/
rm: cannot remove directory `made in USA//ch>??\'\034".\\\017\344': Read-only file system
rm: cannot remove `made in USA//5\016qn\345?{o.y\240\027': Invalid or incomplete multibyte or wide character
rm: cannot remove directory `made in USA//j\367?+g\n??.v??': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//?`as?\344\355?.<?\254': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//\240?c?\265e?\032.wv\277': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//l?(?\346\374ke.o??': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//c?\035?j\363"r.?&?': Invalid or incomplete multibyte or wide character
rm: cannot remove directory `made in USA//b\374m&?m?\n.\345\n?': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//5t?j?z\v\350.?s#': Invalid or incomplete multibyte or wide character
rm: cannot remove directory `made in USA//\033\240?f?t6\022.8\363m': Invalid or incomplete multibyte or wide character
rm: cannot remove directory `made in USA//\241\b$\242p\024[?.?y\273': Invalid or incomplete multibyte or wide character
rm: cannot remove `made in USA//#k\3446?rq=.h5u/?\241?\377\366?xt.?k<': Invalid or incomplete multibyte or wide character
rm: cannot remove directory `made in USA//#k\3446?rq=.h5u/d??&\006?\357r.?\371\344': Invalid or incomplete multibyte or wide character
(that goes on for about a page or two) not only are there garbage fiels in made in USA/ but there are garbage directories nested in garbage directories nested in.... you get the idea.
have you done this in as your account or as root? it looks as if you dont have the right file permissions. . . im not sure but maybe if you try to chmod it as root [su <enter> password] or just delete it as ROOT... not sure if youve tried that. Also what directory is it in? like is it in home or root?
it does because regular accounts dont have rwx permission for those files to be able to delete them but root probably DOES... but thats my theory ... im no guru in this field :/ good luck though
If there's nothing on the usbhd you want to keep, why not just reformat it? Else, as root:
# make sure drive is writable
mount /mnt/usbhd -o remount,rw
# clear any extended attributes just to be sure:
chattr -iu -R /mnt/usbhd
# find and remove. The 0's should protect against interpretable chars, use "x" just to be sure. Hope this works.
find /mnt/usbhd -print0 | xargs -0ix rm -rf "x"
it could be that if it's on an external usb drive, make sure that you've mounted it properly. I used to have a problem like this: when you mount it using the mount command, make sure that you specify explicitly a file system type, otherwise it may do this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.