I encountered a very practical problem: Since I don’t want to increase the depth of the directory and reduce the time of disk seeking, I need to reduce some directory levels.
Everyone knows that folders are created to make file management more convenient. Now it is necessary to reduce the number of folders. How to maintain the convenience of file management has become a must. It is easy for us to think of solving this problem through naming. Can any name be used to facilitate management? Do the naming conventions for styles apply? The naming of styles has been discussed in " [Update] Style Naming Rules ", but the naming rules of styles cannot be applied to the naming of files. After all, the environments used are different and the problems to be solved are also different. The problem of style naming is the semantics of the name, and the scope of the definition can be known through the name; and the problem of file naming is to find the corresponding file more conveniently. Of course, if the name is meaningful, it will also be helpful. More importantly, To solve the problem of how to find files in the same folder faster.
How can I find the files I need faster? The operating system can correctly find the corresponding file through the path, because in each directory level, all tags (directory name, file name) are unique. When we find a file, we generally need the following information:
When was the path modified (even if you know it, it is usually not directly usable and requires multiple clicks)
For computers, it does not need the directory name or file name to be easy to understand, as long as it conforms to the naming rules and is unique at the same level. But for us, we hope to know more information through naming, so the naming needs to have a certain meaning. Going back to the original question, if we are currently in the last directory and faced with so many files, how can we find the files we need more conveniently? Yes, files can be classified by sorting. There are three most commonly used sorts:
In order for sorting to work better, there need to be some rules for naming files. Everyone should know the composition of the file name, right? The general format is "name.extension". Students who need to review can look here ( http://baike.baidu.com/view/733183.htm ). The extension is also part of the file name, but this part is relatively fixed and has nothing to play with. The previous "name" part is the focus of our discussion. Thinking divergently, we can think of adding some relatively fixed words for classification. We call them "fixes", which can be divided into "prefixes" and "suffixes" from the position.
Commonly used suffixes: default directory name, file type, domain name, date, version number
For example, the name is "demo", and the prefix or suffix is as follows:
Default directory name: css_demo |demo_css
File type: png_demo | demo_png
Domain name: blog_demo | demo_blog
Date: 20090904_demo | demo_20090904
Version number: v1_demo | demo_v1