How can I explain to my colleagues that file names should not contain uppercase or special characters?

For what I know, it is best to name the following files: file_name.txt - or if you want file-name.txt.

Now, some people like to name their files fileName.txt or FILENAME.TXT or "File Name.txt" - how to explain to them that this is not a good idea? Why exactly the above names of file names?

I only vaguely know that some file systems have problems with uppercase letters, and that URIs must be lowercase to avoid confusion (Wikipedia has uppercase characters in their URLs, although, for example, http: //en.wikipedia. org / wiki / Sinusitis )

Sh.

+3
source share
5 answers

Well, the problem with uppercase letters will be that some file systems (e.g. NTFS) ignore them and treat filename.txt and FILENAME.TXT as the same file, while other file systems (for example, I think ) think of it as 2 different files.

So, if you have a link to a file that you named file.txt, and links point to a File.txt file, then NTFS is not a problem, but if you copy files to the file system as ext, the link will not work, because the file system thinks that there is no such file as File.txt.

Because of this, lowercase letters are best used.

+5
source

, , CAPS , , , .

, , , .

, . CrAzY cAsE. CrAzY cAsE CAPS . : ", , , . .

+4

!

( ), , , DOS Windows Unix, , CAPS LOCK .

Unix- , , .

Best Practice - .

- , .

+1

, " ", CAPS .

, , , , , , .

, ( ). , , , , , , .

, , , , , , . , , .

+1

The POSIX standard (IEEE Std 1003.1) defines a character set for portable file names (however, it indicates that this case should be retained). At the very least, it removes spaces and other "special" characters from the set.

Memory set: [a-zA-Z0-9 _-.]

0
source

Source: https://habr.com/ru/post/1720557/


All Articles