I renamed a folder to Avengers: Infinity War (2018)
I also created a folder Experiment:\
CAUTION:
Don't do this if you are going to backup on NTFS or FAT drives!
If you try, do at your own risk!
I renamed a folder to Avengers: Infinity War (2018)
I also created a folder Experiment:\
CAUTION:
Don't do this if you are going to backup on NTFS or FAT drives!
If you try, do at your own risk!
You need to study up on what is a permissible file name. The standards are different for Linux and Windows. You are violating the naming rules of the file system you are writing to.
The same applies to file sizes for fat formatted drives, you will corrupt the drive if you try to copy a file larger than the file system supports. This isn't stuff you need to learn for Linux this is Windows rules you are breaking. As a Windows user you should know the rules for Windows file systems.
Better yet, just ditch the antiquated Windows file systems and you won't have to worry about the rules for Windows file names anymore.
This has nothing to do with Windows as I did this in Garuda which is in BTRFS partition.
I don’t have a Windows partition at all in my PC, it’s been around a year I ditched Windows from my computer. I just have a hard drive of NTFS format by default and it has so many stuff that I’m too lazy to copy them to other, reformat and then put them back.
For the most part, Linux filesystems allow you to use any naming. I don't know off the top of my head what is illegal, but it's not much.
NTFS=Windows.
NTFS uses Windows naming conventions. You can write files on Linux with strange names, but if you try to transfer those illegal Windows file names to an NTFS drive then you will have real problems unless you mount the drive with the Windows file name flag.
You can find the info in man fstab
or on the Archwiki.
Can I make an invisible file name w/ Unicode 1364
Ya you’re right, that’s why I added this:
Unicode 1364 is “፤” right? What is invisible here?
“⠀” is U+2800, I tried this too, so you can.
Again, at your own risk.
Oh and for the OP, you CAN do those commands in the terminal, you just need to understand escape character to do it (I tested to make sure).
mkdir "Experiment:\\"
Sorry I meant Unicode u + 1364, got very popular in among us because you could use it for blank names
Oh ya, why didn’t it come to my brain
Edited my post.
cool time to make a folder called
晪袃A沧gӁY|ᣥÜAƅԽ؋Гa괺ն勓QIݝ1モBٶ唚$﹩
#غ𑒑?먥(ﲀI谗Ѻ֖+խ:uėͼu统쩼ͅѲj܊b˒
ΰCT4w&壘"؋囖🕣%M殑╭yօ֙ƝˮQ]
Ԡ䈾Ļ֑1QƔՀ锶>덈唾fחH|ĕ*ݢޯ 牛ݰ啭
hԹ.ף߬چ⚇O^ Yήʚ߀頧#ٕ畁𮚄ͭݙ
TL;DR: any character except /
and null
is allowed in filenames.
It’s been rather a pain for me at Forward Solidus Invalid In Filesystem Paths · Issue #46 · json5/json5-spec · GitHub. However, that’s not all the kernel disallows — .
and ..
are also, to my knowledge. It’s always seemed strange to me that we can’t just escape these characters to allow ourselves to be able to use them.
These are valid characters for file or directory names in Linux, and in fact are very commonly used. “.
” is used for differentiating file extensions or marking hidden files, for example.
You can. You can escape characters with a backslash (\
), or enclose the filename in quotation marks if it has invalid characters.
I meant as file names, not as characters.
I can’t escape the forward solidus with a backward one on BTRFS, and considering that we’re using BTRFS, there’s nothing except null
and /
to escape (unless using GIMP). All command line tools ignore it, and Dolphin converts it into another character, even when supposedly escaped.
Yes, these are valid characters for file names.
❯ touch "file.name..1.2.3.."
❯ ls "file.name..1.2.3.."
.rw-r--r-- 0 jeremy 13 Dec 10:31 file.name..1.2.3..
If you mean you are trying to name a file exactly “.
” or “..
”, the reason that is not succeeding is because every directory is already using those names for something else.
I can’t escape the forward solidus with a backward one on BTRFS, and considering that we’re using BTRFS, there’s nothing except
null
and/
to escape (unless using GIMP).
You can escape characters with a backslash so they are not interpreted by the shell as an argument. This is commonly done with spaces, for example.
mkdir /path/to/directory\ with\ spaces
You cannot use a forward slash the way you are thinking, because the “/” character is reserved as a directory separator. That is to say, naming your file “file/with/slash.txt
” is interpreted like this:
file/
└── with/
└── slash.txt
The forward slash should not be used in a file name with any filesystem–even if it is allowed–because most of the computers in the world will not interpret the file name as intended. That is why it is a disallowed character in pretty much any filesystem, even on Windows where directories are separated with another character.
By the way, there is nothing wrong with the word “null”; it is perfectly fine to use it in file names or directories.
❯ touch null
❯ ls null
.rw-r--r-- 0 jeremy 13 Dec 10:51 null
It is the null character which is not allowed.
Thank you for that, but I’m not looking for assistance. I was sharing with the thread exactly what you just more verbosely explained. You explained it all better than I did, though.
Well, aren’t you just the cat’s meow!