The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: File ?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 12-29-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
Assuming the bad files are not in a critical directory such as /etc /root ...

Try moving everything you can out of the directory to a safe spot, then go back to the directory with the bad files and try rm -rf ./*
If that does not work, mv the directory to a new location, here's an example

the bad file is in /baddir/

mkdir /dir2
mv baddir /dir2
cd dir2

then:
rm -rf ./*


There is an appropriate way to delete the file itself, but I do not remember what it is outside my original post.

-Seg

edit: if it was left there by vi it's probably locked. I have not used vi in a long long time, if i recall correctly when the same thing happened to me i had to reenter vi and get vi to open the file, close it then it was gone. it's that kind of crap that sent me to pico in the first place.