I'm trying to rename directory and I need to use "/" symbol but ubuntu won't allow it. Is where any way to "cheat" ubuntu into allowing me to use it?
You probably don't actually want to do this. As other people have said,
/ is the directory name separator (i.e., it separates directory names in a path). So if you think that you actually want
/ in a directory name because something is telling you to do it, you're probably misreading the instructions and/or the instructions are wrong. All the answers telling you how to 'fake' it are telling you how to do something you don't want to do, and won't help you anyway: even though a character might look like a forward slash, your OS won't treat it as one for the same reason that it treats 1 and l and I differently.
As 3Doubloons said in a comment, if documentation mentions a folder named
mods/, what it actually means is a folder named
mods. The fact that it's not finding it is an entirely separate issue.
The / is a reserved character to indicate directories. A block for this is even included in our kernel. More details on stackoverflow. You can use another char that -looks- like a / though. From comments in the link:
There are plenty of other suitable candidates: ⁄ is U+2044 FRACTION SLASH; ∕ is U+2215 DIVISION SLASH; ⧸ is U+29F8 BIG SOLIDUS; ／ is U+FF0F FULLWIDTH SOLIDUS, and ╱ is U+2571 is BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT. All would work admirably!
/ is directory separator, like
/ in Windows.
However, if you really want to use
/, you can use similar characters. In my opinion, U+29F8 (BIG SOLIDUS) looks like a slash, and you can copy it from here. You can also modify the file system directly, but this is not recommended, and probably would confuse operating system a lot, because it would introduce ambiguities (is
/bin/bash the file in current directory, or path to standard interpreter?).
The best way however is avoiding
/ in file names. There are other characters you can use. For example, you can write
& instead of
/ in certain cases (
files&directories). This will make things less confusing.
You cannot use
/ in a folder's name! There's no way Linux could make the difference between a subfolder in folder and single folder.