Undeletable file


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Undeletable file
# 8  
Old 07-18-2019
Ah, no. When I said:

Code:
# rm -rf <directory name>

the # was meant to be the root prompt as I was assuming you would login as root.

Do NOT type the '#' :

Code:
rm -rf <directory name>

# 9  
Old 07-18-2019
Thanks, I didn't catch that, but it's still giving me trouble.

Code:
sh-3.2# rm -rf 5
rm: 5/␀␀Word Finder® Plus™: Invalid argument
rm: 5: Directory not empty
sh-3.2#

sigh. I used the "sudo su" method rather than enabling root from the preferences. Should I try that?

cheers,
dp
# 10  
Old 07-18-2019
This is proving difficult.

Can you please post:

1. The output of ls -li on the zombie so we can see the file size, access rights and inode number.
2. What operating system is this?
3. What type of filesystem is this? eg, ZFS, UFS or what?

There are other nuclear options but you would need to do a full filesystem backup first, then keep users off until the job is done.
We are talking filesystem internals now.
# 11  
Old 07-18-2019
Does your find command offer the -delete action?
Code:
find . -delete

# 12  
Old 07-18-2019
Hmm, looking at the hexdump reminded me of something that happened in my AMIGA heydays...
Because you quoted that file dates back to 1992 maybe instead of each 'NUL' character being decoded as a UNICODE, they are a single byte ONLY.

I suspect that each 'NUL' is not 0xE2 0x90 0x80 but is in fact ONLY 0x00 with the top bit set giving 0x80 and they are being interpreted as UNICODE characters.
I have no idea if this would work but this might work in bash:
Code:
namestart=$'\x80\x80'
rm -rf "${namestart}"*

This could even apply to the (R) and TM characters as well.
Just a lateral thought.
# 13  
Old 07-19-2019
Hello dpontius,

Can you get the output from ls -li in the directory? That should list the inode number in the first column. You could then use find like this:-

Code:
/tmp/tmp.jwq73hdq # ls -li
total 0
2360780 -rw-rw-r-- 1 rbatte1 rbatte1 0 Jul 19 08:54 ␀␀Word Finder® Plus™
/tmp/tmp.jwq73hdq # find . -inum 2360780 -exec rm {} \;
/tmp/tmp.jwq73hdq # ls -li
total 0
/tmp/tmp.jwq73hdq #


Does that help? If not, what does the output of lsattr give you?
Code:
/tmp/tmp.jwq73hdq # rm *
rm: remove write-protected regular empty file `␀␀Word Finder® Plus™'? y
rm: cannot remove `␀␀Word Finder® Plus™': Operation not permitted
/tmp/tmp.jwq73hdq # lsattr
----i--------e- ./␀␀Word Finder® Plus™
/tmp/tmp.jwq73hdq # chattr -i *
/tmp/tmp.jwq73hdq # rm *
/tmp/tmp.jwq73hdq #

...... maybe even a combination of this then the find might be needed.



I hope that this helps,
Robin
# 14  
Old 07-19-2019
I know that you say that you want to delete this "zombie" file but do you know how it got there? With a name like that including unprintable characters and possibly a set inode number I have a thought that it could be part of a license key for an age-old application. If you are still using that application you could find that it stops dead as soon as you succeed in deleting this file.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

2. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

3. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

4. UNIX for Dummies Questions & Answers

Files.... undeletable.

I've some files created by a script. For some reason last time the script run was interrupted for an error and the files produced by the script are undeletable. i've tryed as root with command 'rm' and even if i got no error in command execution the files are still there. These are the... (9 Replies)
Discussion started by: mirrorx
9 Replies

5. UNIX for Dummies Questions & Answers

undeletable file

when i try to ls -lrt the directory, the "undeletable" file is listed. but when i try to ls -lrt *exe, the "undeletable" file is not listed. this "undeletable" is the file that i want to delete from the directory. but when i try to delete/rename/copy.... it, it show that "No such file or... (10 Replies)
Discussion started by: chxxangie
10 Replies
Login or Register to Ask a Question