Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem deleting file by conventional methods 1

Status
Not open for further replies.

lincoln123

IS-IT--Management
Nov 4, 2002
15
GB
Hi,
I'm new to Solaris (I am a business analyst by background and ended up with this task by default). My company is developing a Java application to run on a Weblogic server 6.1 sp2. Due to resource constraints we are actually doing the development on a Windows 2000 environment, before transferring the code via FTP to a Tadpole Ultrabook IIe running Solaris. In the absence of the developers' presence an install was attempted which ended up with putting the files into the wrong directory, and consequently the application did not work. It was decided that the the easiest thing was to delete all the files and reinstall the application. Unfortunately we have been unable to delete one file
./inner_html_experiment.jsp

I'm logged in as root
I have tried deleting the file using
#rm inner_html_experiment.jsp
and get the message
# inner_html_experiment.jsp: Invalid argument
I try
# rm -rf -- ./inner_html_experiment.jsp
I do not get any error, but the file still remains undeleted
I cannot use chmod to change the ownership, or unlink. Similarly, I cannot delete the parent directory experiment as it has a member.
The file appears to be corrupted, as it has a creation date of 1993, which is not the case and no owner.
Any ideas on deletion?
Thanks,
Jack
 

a) this is my be used by an other proc, as long its works
you mybe can truncate it, but still will be there
b) find out wich proc is writint to it: fuser, lofs...
c) post more infos, file filename, ls -l ...
-----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
try first the output of: ls|od -c -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
There's probably an unprintable character in the file name.
Do rm -i *html*
The filenames will appear one by one, with choice to delete.
HTH
;-) Dickie Bird
Honi soit qui mal y pense
 
Thanks for getting back to me,
Tried
#fuser inner_html_experiment.jsp
inner_html_experiment.jsp: fuser: Invalid argument
#ls -l
inner_html_experiment.jsp:Invalid argument
Not sure what is meant by lofs?
Tried
#ls|od -c
0000000 i n n e r _ h t m l _ e x p e r
0000020 i m e n t . j s p \n
0000032
 
Unfortunately still there
# rm -i *html*
inner_html_experiment.jsp: Invalid argument
 
is there a 'l' ell or '|' pipe in html ??? -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
did you try ls -b ?
is this file a dir ?
-----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
jamisar,
No, not in the name and in fact the file is actually empty...
 
what rm are you using, an alias ?
try /bin/rm -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
jamisar,
Doesn't seem to be
# ls -b
inner_html_experiment.jsp
 
save your other files && rm the dir then mkdir and restore the other files :( -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
# /bin/rm inner_html_experiment.jsp
inner_html_experiment.jsp: Invalid argument
# rmdir experiment
rmdir: directory "experiment": Directory not empty
:(
 
sure: rmdir removes empty dirs only!
rm -rf is better
what says file 'which rm' ?
and echo $path or $PATH
could rm be a stupid script in the path before {/usr}/bin ?
(no backquotes on my kb) -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
Code:
/bin/rm -fr experiment
would delete everything in it and the directory itself. //Daniel
 
Unfortunately, so far
# rm -rf experiment
rm: Unable to remove directory experiment: File exists

# file /bin/rm
/bin/rm: ELF 32-bit MSB executable SPARC Version 1, dynamically linked,
tripped

# rm -rf experiment
rm: Unable to remove directory experiment: File exists
JBI
 

so... back to root.
an other proc is using this file-descriptor.
if you want kill it, reboot (my be in single) && kill it.
:( -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
If you remove an open file, the listing in "ls" still disappears, and the inode will actually be released when the file is finally closed.

Did you fsck the filesystem?

Mind posting an "ls -l" of the directory in question? maybe it's not really a file...
 
Good Morning,
Try this, as root:
cd to the directory
rm -f ./"inner_html_experiment.jsp"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top