1

I need to open a file with filename that contains forward slashes. I am wondering how I can do that. I have been searching through Google and I can't seem to find a way.

Thanks

Gnator
  • 11

2 Answers2

1

Turning my comment into a bit of a possibly useful answer. Try renaming the file.

ls -i

Will give you the inode number of the file. You can then use a combination of find and mv to rename the file as follows:

find . -inum "inode-number-from-ls -i" -exec mv {} "newfilename" \;

Give the file a "normal" new file name and you're good to go.

SBI
  • 779
  • 4
  • 9
-1

It must be a Windows file. You have several ways to solve this:

  • Wrap the name with quotes: vi "file/name".
  • Use tab to complete the name. It will give you the proper way to write it.
  • Find a pattern and use *. If the name of the file is file/name, you can do vi fil* and this will be opened (together with others that can have same pattern).
fedorqui
  • 2,027