Jack Wallen explains why areas in information and folder names aren’t at all times the most suitable choice in Linux.

linux penguin

Picture: Jack Wallen

I can not inform you what number of instances I get requested by collaborators, colleagues, family and friends, “Why do you by no means put areas in file and folder names?” The reply to that query is mostly met with both clean stares or cries of “What?” Manner again when, within the mid-1990s, once I was nonetheless utilizing Home windows, areas in file and folder names have been commonplace for me. 

Then I made the swap to Linux in 1997, and every part modified on each stage. That included the names I gave information and folders. Again then, making a folder identify with an area was in very unhealthy type and will trigger you all types of bother navigating the listing construction. 

SEE: Linux service management instructions (eBioPic Premium)

As an illustration, take a listing named TEST DIRECTORY. In the event you issued the command mkdir TEST DIRECTORY, you would not be making a listing named “TEST DIRECTORY” however two directories, TEST and DIRECTORY. To create “TEST DIRECTORY,” you’d need to concern the mkdir command with the identify in double-quotes, as in mkdir “TEST DIRECTOR.” To vary into that listing, you’d concern the command: 

cd "TEST DIRECTORY"

Nonetheless, in case you created the listing TEST_DIRECTORY, you would not need to undergo the additional steps. Most Linux instructions see each separate entry as an choice, so mkdir TEST DIRECTORY can be taken as two instructions—mkdir TEST and mkdir DIRECTORY

This concern is not almost as problematic in a GUI. Actually, when working with a GUI, you’ll be able to create information and directories with a number of areas. In the event you’ll even be working from inside the command line, I recommend you do not since you will not wish to need to cope with the headache of by accident deleting each the TEST and the TEST DIRECTORY directories. 

This concern can get a bit convoluted, so simply keep in mind to keep away from utilizing areas in your Linux file and folder names and you will be okay. Get pleasant with both the sprint or the underscore and every part might be tremendous.

Subscribe to eBioPic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise execs from Jack Wallen.

Additionally see

Leave a Reply