10/1/11

Deleting *nix files by their inode number


For deleting those stubborn files or files with odd characters in their file names:
First find out file inode number with any one of the following command:
stat file-name OR ls -il file-name
If you cannot type the file name, just use * instead of file-name for show file info (including inode numbers) for all files in that directory:
Then,

Use the find command to find and remove a specified file:
find . -inum [inode-number] -exec rm -i {} \;
Hit the Y key  to confirm deletion of the file.

No comments:

Quick HTTP to HTTPS - Apache2

There are several methods for redirecting your Apache-based website visitors who might type your servers URL using the plain (non-secure) HT...