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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing a file from Unix

Status
Not open for further replies.

tomstone98

Programmer
Sep 23, 2003
2
0
0
US

We have a file on a unix box that we cannot remove.
The file is: xxx.dat
The error received is:
rm: xxx.dat not removed: I/O error

The ls -l command reveals that there are no links to the file:

hostname% ls -l xxx.dat
-rwxrwxrwx 0 aaa bbb 79 Oct 8 14:50 xxx.dat

Do I need to log in as root and remove it ?
I have tried the link and the ln command but to no avail ...

Thanks,
Tom Stone
 
can u over write the file say by following method
> xxx.dat


-----------------
ur feed back is awelcome desire
 
Tom try this

#rm -f "filename"

f = force

you can also do a man on rm and read the different options available to you.
 
Sometimes there are characters that cannot be seen with a simple l or ls.

try this

ls > dir
vi dir and remove all files EXCEPT the one you are having problems with.

rm `cat dir`

if you really need to delete this file and this fails move all wanted files to another directory and remove the directory rm -r dir . mkdir dir and move wanted files back.
 
You could also try using unlink instead of rm. Be careful with it though!

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top