How to remove files or directories files with names that contains spaces, and special characters such as -, -- @ <> etc

Remove file by an inode number
The -i option to ls displays the index number (inode) of each file:
 
ls -li

Use find command as follows to delete the file if the file has inode number 4063242:
 
$ find . -inum 4063242 -delete
OR
 
$ find . -inum 4063242 -exec rm -i {} \;
 
 file-2

Comments

Popular posts from this blog

How to clean all the foreman task and locked task

CentOS 7 Server Hardening Guide

How to restrict users to send only mail to the local domain in Zimbra