How to open files with forward dash in linux
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
52 Answers
Turning my comment into a bit of a possibly useful answer. Try renaming the file.
ls -iWill 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.
3It 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 isfile/name, you can dovi fil*and this will be opened (together with others that can have same pattern).