Deleting A File By It's Inode Value
It is possible to delete a file by the it's inode value. To test this, first create a file:
$ cat > '\n\n\n\n\n\n\n'
type some text
^D
To list the inode and display the characters.
$ ls -libt *
To remove by inode. Note the "--" option. This will keep any special characters in the file from being interpreted at "rm" options.
$ find . -inum -exec rm -- '{}' \;
Or to check contents
$ find . -inum -exec cat '{}' \;
Reference: http://www.faqs.org/ftp/usenet/news.answers/unix-faq/faq/part2
- 0 Comment
- Mike Chirico
- 18 Jan 2009, 02:29
-
You must be login first or sign-up for an account to post comments.
Maybe you should look at these also:
USERBOX
CATEGORIES
MOST READ TODAY
- Syntax highlighting in less
- Disabling reverse dns lookups in ssh
- Calculating SHA Checksums
- Enabling remote desktop on a VirtualBox Machine
- Users with /bin/false shell to login on vsftpd
- Redirecting tcp / udp ports with socat
- How to record a linux session
- How to extract a deb package without installing
- Booting from an ISO image using qemu
- Recursively mput with smbclient
LAST ADDED
- Using iPhone internet sharing over bluetooth under Linux
- Using USB sound card with amarok
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Disabling ipv6 functionality
- How to convert a mp3 file
- How to choose the fastest Debian mirror
- Disabling reverse dns lookups in ssh
- Rewriting destination ip address
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
