Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot delete files with unsupported chars in F2FS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 134

PostPosted: Fri Nov 03, 2017 6:59 pm    Post subject: Cannot delete files with unsupported chars in F2FS Reply with quote

Hi,
There is bunch of certs, which cannot be deleted.
Filenames contain unsupported charcodes.
Every boot watching invalid hash_code file list, that "fixed" by f2fs fsck, but in fact, they arent fixed, because it just cant read those filenames while "fixing".

Tried many ways to remove those files (dd,rm), and still nothing.

Sample with wipe:
wipe: cannot stat `T��B��TAK_UEKAE_K��k_Sertifika_Hizmet_Sa��lay��c��s��_-_S��r��m_3.crt': No such file or directory
wipe: cannot stat `EBG_Elektronik_Sertifika_Hizmet_Sa��lay��c��s��.crt': No such file or directory
wipe: cannot stat `AC_Ra��z_Certic��mara_S.A..crt': No such file or directory
wipe: cannot stat `T��RKTRUST_Elektronik_Sertifika_Hizmet_Sa��lay��c��s��_H5.crt': No such file or directory
wipe: cannot stat `T��RKTRUST_Elektronik_Sertifika_Hizmet_Sa��lay��c��s��_H6.crt': No such file or directory
wipe: cannot stat `Certinomis_-_Autorit��_Racine.crt': No such file or directory
wipe: cannot stat `NetLock_Arany_=Class_Gold=_F��tan��s��tv��ny.crt': No such file or directory

Any ideas? Im so tired of that fsck halt on every boot...
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 134

PostPosted: Fri Nov 03, 2017 7:25 pm    Post subject: Reply with quote

Code:
ace ca-certificates # ls mozilla/
ls: cannot access 'mozilla/T'$'\303\234''B'$'\304\260''TAK_UEKAE_K'$'\303\266''k_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_-_S'$'\303\274''r'$'\303\274''m_3.crt': No such file or directory
ls: cannot access 'mozilla/EBG_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''.crt': No such file or directory
ls: cannot access 'mozilla/AC_Ra'$'\303\255''z_Certic'$'\303\241''mara_S.A..crt': No such file or directory
ls: cannot access 'mozilla/T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H5.crt': No such file or directory
ls: cannot access 'mozilla/T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H6.crt': No such file or directory
ls: cannot access 'mozilla/Certinomis_-_Autorit'$'\303\251''_Racine.crt': No such file or directory
ls: cannot access 'mozilla/NetLock_Arany_=Class_Gold=_F'$'\305\221''tan'$'\303\272''s'$'\303\255''tv'$'\303\241''ny.crt': No such file or directory
'AC_Ra'$'\303\255''z_Certic'$'\303\241''mara_S.A..crt'
'Certinomis_-_Autorit'$'\303\251''_Racine.crt'
'EBG_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''.crt'
'NetLock_Arany_=Class_Gold=_F'$'\305\221''tan'$'\303\272''s'$'\303\255''tv'$'\303\241''ny.crt'
'T'$'\303\234''B'$'\304\260''TAK_UEKAE_K'$'\303\266''k_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_-_S'$'\303\274''r'$'\303\274''m_3.crt'
'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H5.crt'
'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H6.crt'
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Sat Nov 04, 2017 1:54 pm    Post subject: Reply with quote

Hello

You may try and use rm command with inodes rather than file names.

++
Gi)
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 134

PostPosted: Sun Nov 05, 2017 1:07 pm    Post subject: Reply with quote

guitou wrote:
Hello

You may try and use rm command with inodes rather than file names.

++
Gi)

ace mozilla # ls -il
ls: cannot access 'T'$'\303\234''B'$'\304\260''TAK_UEKAE_K'$'\303\266''k_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_-_S'$'\303\274''r'$'\303\274''m_3.crt': No such file or directory
ls: cannot access 'EBG_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''.crt': No such file or directory
ls: cannot access 'AC_Ra'$'\303\255''z_Certic'$'\303\241''mara_S.A..crt': No such file or directory
ls: cannot access 'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H5.crt': No such file or directory
ls: cannot access 'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H6.crt': No such file or directory
ls: cannot access 'Certinomis_-_Autorit'$'\303\251''_Racine.crt': No such file or directory
ls: cannot access 'NetLock_Arany_=Class_Gold=_F'$'\305\221''tan'$'\303\272''s'$'\303\255''tv'$'\303\241''ny.crt': No such file or directory
total 0
? -????????? ? ? ? ? ? 'AC_Ra'$'\303\255''z_Certic'$'\303\241''mara_S.A..crt'
? -????????? ? ? ? ? ? 'Certinomis_-_Autorit'$'\303\251''_Racine.crt'
? -????????? ? ? ? ? ? 'EBG_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''.crt'
? -????????? ? ? ? ? ? 'NetLock_Arany_=Class_Gold=_F'$'\305\221''tan'$'\303\272''s'$'\303\255''tv'$'\303\241''ny.crt'
? -????????? ? ? ? ? ? 'T'$'\303\234''B'$'\304\260''TAK_UEKAE_K'$'\303\266''k_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_-_S'$'\303\274''r'$'\303\274''m_3.crt'
? -????????? ? ? ? ? ? 'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H5.crt'
? -????????? ? ? ? ? ? 'T'$'\303\234''RKTRUST_Elektronik_Sertifika_Hizmet_Sa'$'\304\237''lay'$'\304\261''c'$'\304\261''s'$'\304\261''_H6.crt'
Back to top
View user's profile Send private message
Mr. T.
Guru
Guru


Joined: 26 Dec 2016
Posts: 477

PostPosted: Sun Nov 05, 2017 2:34 pm    Post subject: Reply with quote

How did you encounter this situation? Your issue seems strange! Have you tried to use wildcards?

Code:
ace ca-certificates # rm -ri mozilla/*
# If the above command does not work ; see below:
# All the files and directories under "firefox" will be deleted!!
#    rm -rf mozilla/*


helecho.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Nov 05, 2017 4:35 pm    Post subject: Reply with quote

Wildcards will just cause the shell to enumerate the directory, then pass wildcard-matched filenames as explicit arguments. n05ph3r42 already showed that letting ls enumerate the directory and then stat the names it just found via enumeration fails. Adding an extra indirection by requiring the shell to enumerate the arguments is unlikely to help.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Nov 05, 2017 4:40 pm    Post subject: Reply with quote

I'd boot from an external media and run fsck from there, it may work better this way.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum