Reputation: 225
bash-3.2$ ls -ls
total 48
4 -rw-r--r-- 1 hdoostie etrade 1545 Aug 8 2012 ~
4 drwxr-xr-- 11 hdoostie etrade 4096 Dec 28 2011 det-us
4 drwxr-xr-- 6 hdoostie etrade 4096 Sep 18 2012 etaf
12 -rw-r--r-- 1 hdoostie etrade 11867 Jul 31 2012 l:template name="expanded_search">
4 drwxr-xr-- 8 hdoostie etrade 4096 Apr 22 11:31 neo
4 drwxr-xr-- 5 hdoostie etrade 4096 Jan 29 14:36 neo-apps-skins
4 drwxr-xr-- 5 hdoostie etrade 4096 Feb 16 2012 neo-webapp-prospect
4 drwxr-xr-- 3 hdoostie etrade 4096 Feb 22 2012 site_04_uat_in_here
4 drwxr-xr-- 3 hdoostie etrade 4096 Jun 20 2012 svntest
4 drwxr-xr-- 3 hdoostie etrade 4096 Feb 23 2012 xborder_in_here
"l:template name="expanded_search">" is some file content that somehow shows as a file. How do I "delete" this "file"?
Upvotes: 0
Views: 176
Reputation: 69022
A way of deleting any file, no matter what characters the filename contains is using it's inode numnber. You can show that using:
ls -i
That will shou you the files with the inode number next to them. Then you can delete that file using:
find -ium [inode_number] -exec rm {} \;
But in this case it should also be enough to just quote the filename:
rm 'l:template name="expanded_search">'
Upvotes: 3