can't open file over ssh

Borkil

Senior member
Sep 7, 2006
248
0
0
I'm trying to read a logfile over ssh, however i can't open it. when i list the files in the directory the logfile is there. however if i "vi logfile" it just creates a new file. i think the problem is that theres some kind of special character in the file name. how can i access the file or fix the name?
 

Borkil

Senior member
Sep 7, 2006
248
0
0
nope, same user. when using a gui file explorer i can double click and it opens just fine. but i can't type the name in the terminal to open it. the file permission is -rw-------
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
i think the problem is that theres some kind of special character in the file name. how can i access the file or fix the name?

Put the file name in quotes, or use backslashes ('\') to escape the special characters.
 

PCTC2

Diamond Member
Feb 18, 2007
3,892
33
91
Put the file name in quotes, or use backslashes ('\') to escape the special characters.

Or, you could tab to completion (type 'vi f' if the first letter of the filename is 'f' and then hit tab to complete it (sometimes you need to enter more letters before it will compete it)). Or you could escape it with backslashes as Aluvus said.