1837897 Members
3218 Online
110123 Solutions
New Discussion

corrupt files (??)

 
SOLVED
Go to solution
Jay Cantwell
Regular Advisor

corrupt files (??)

Please look at the attached listing and could anyone tell me what caused this, how can it be prevented, and how do I remove the files with the question marks

BTW .. this is on an HFS, stripped file system (if this helps)...thanks Jay
3 REPLIES 3
CHRIS_ANORUO
Honored Contributor

Re: corrupt files (??)

Check your /etc/profile for control characters, and how to suppress them.
Eg.stty erase '^H'
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
John Palmer
Honored Contributor
Solution

Re: corrupt files (??)

Hi Jay,

^? is the representation for the DEL character (0x7F). This usually happens when someone has their backspace key misconfigured, they think that they are erasing characters when in fact they are adding DEL's.

There are several ways of deleting them, one is as follows:-

Set $X to be a DEL character:-
X=$(print "\0177")

Then you can use $X in ll and rm commands:-

ll *$X*
rm -i *$X*

The above will list and offer to remove any file which contains a DEL character.

Regards,
John
federico_3
Honored Contributor

Re: corrupt files (??)

to me the backspace has been typed many times to cancel something wrong written by keyboard.
To avoid this in your .profile or in /etc/profile set

stty erase '^H'

federico