Skip to main content

linux - Have a file named ~ (tilde) in my home-directory


I just noticed that I have a file called ~ in my ~-directory.


$ ls -la ~
...
-rw-r----- 1 x1 x1 733962240 Mar 1 17:55 ~
...

Any idea how I can mv or rm it?



Answer



The pretty much ultimate solution when it comes to files that can't be deleted by normal means:


ls -il 

The first column will show the inode number of the files.


find . -inum [inode-number] -exec rm -i {} \;

This will delete the file with the specified inode-number after verification.


Comments