Advertisement

Delete a file using its inode?

Started by February 01, 2004 03:38 PM
2 comments, last by aftermath 20 years, 9 months ago
Hello. I accidentally SC’ed some files onto my server, and now I cannot delete them. Specifically, the files are in Unicode (Russian) and I cannot type them into my terminal. I thought that if there was a way to just unlink the inodes, this would do what I want. Is there any way to find the inode of a file and delete it? One of the files (there are two) is a directory.
Rate me up.
eh...

cd /diretory with the files in it/
rm -i *
n
n
n
n
n
n
(ah, the russian thinger!)
y
n
n
n
n

yeah.
Advertisement
find /the/directory -inum the_inode_number -exec rm ''{}'' \;

Similarly for the directory, but "rmdir" that one. Or add a -r after the "rm".
quote: Original post by C-Junkie
eh...

...

yeah.


That worked perfectly. I had to ad -r to it to delete the directory. Thank you.
Rate me up.

This topic is closed to new replies.

Advertisement