is it in the root of your home (which is what you wrote), or root of root?
looks to me like the file is named 1 and not the ~ you are trying to
remove…
any way, do you know why the file is there, and what it is for?
if not, don’t touch it…find out, and then take the right action.
–
dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255
> Hi all - Silly Q, i’v ssh’ed onto my machine at home and noticed the
> below file in my ~ folder…
>
>
> Code:
> --------------------
> -rw-r–r-- 1 osuser users 10240 2011-05-16 12:41 –
> --------------------
>
>
> I have tried the following command
> Code:
> --------------------
> rm -v “-”
> --------------------
> but get
> Code:
> --------------------
> rm: cannot remove `-’: No such file or directory
> --------------------
> as an error.
>
> Also tried to ‘tab’ to the file but nothing :shame:
The name looks to be an em dash (not a ‘normal’ dash). Try using mc or
some other file browser to delete it.
@ DenverD - The file was in my home, non root, folder. The file is not a ‘1’ but a ‘-’, a Special character file. It must of got created when i was testing a bash script…
@ nrickert - I tried your method, bar the -f switch, which would not work - so tried the inode method which worked…
I just tried by creating a file with the ASCII minus sign as a name:
henk@boven:~/test> l
totaal 8
drwxr-xr-x 2 henk wij 4096 1 jun 20:29 ./
drwxr-xr-x 79 henk wij 4096 1 jun 20:29 ../
henk@boven:~/test> echo "" >-
henk@boven:~/test> l
totaal 12
-rw-r--r-- 1 henk wij 1 1 jun 20:29 -
drwxr-xr-x 2 henk wij 4096 1 jun 20:29 ./
drwxr-xr-x 79 henk wij 4096 1 jun 20:29 ../
henk@boven:~/test> rm -
henk@boven:~/test> l
totaal 8
drwxr-xr-x 2 henk wij 4096 1 jun 20:29 ./
drwxr-xr-x 79 henk wij 4096 1 jun 20:29 ../
henk@boven:~/test>
It shows that deleting such a file is trivial. It could thus be that the name:
. is another Unicode character that looks like the ASCII -. IMHO one can remove this in a terminal emulator by copy/past of the name in the rm command.
. contain other characters that show no glyph on the screen. This can be detected by using ls -b.