1 00:00:00,530 --> 00:00:04,520 In the last video, we showed you a command that could create directories. 2 00:00:04,520 --> 00:00:08,618 But although you can name files and directories almost anything you want, 3 00:00:08,618 --> 00:00:10,178 the wrong name can confuse or 4 00:00:10,178 --> 00:00:13,247 inconvenience other users who need to access the file. 5 00:00:13,247 --> 00:00:15,852 To help avoid this, some conventions for file and 6 00:00:15,852 --> 00:00:18,530 directory names have been created over the years. 7 00:00:19,580 --> 00:00:23,810 File names are case sensitive on Windows and Linux systems. 8 00:00:23,810 --> 00:00:26,720 For example, I can make a Park directory with a capital P. 9 00:00:28,240 --> 00:00:31,350 If I list files now, you'll see two park directories. 10 00:00:31,350 --> 00:00:35,820 One in all lower case and one starting with a capital letter. 11 00:00:35,820 --> 00:00:41,340 This would not be true on Mac OS, which uses a case insensitive file system. 12 00:00:41,340 --> 00:00:44,840 A Mac would have complained that the park directory already exists because of 13 00:00:44,840 --> 00:00:46,060 the lower case version. 14 00:00:46,060 --> 00:00:49,910 It would not let me create an additional uppercase version. 15 00:00:49,910 --> 00:00:52,550 Uppercase letters are always legal to use, but 16 00:00:52,550 --> 00:00:57,040 to help avoid confusion you should stick to all lower case letters in file names, 17 00:00:57,040 --> 00:01:00,440 regardless of what operating system you use. 18 00:01:00,440 --> 00:01:04,300 Most file systems allow unicode characters in file names now, but 19 00:01:04,300 --> 00:01:08,430 the special characters cause problems on older file systems. 20 00:01:08,430 --> 00:01:12,360 If you're creating a file or a directory you intend to share, you should stick to 21 00:01:12,360 --> 00:01:16,360 ASCII characters, unaccented characters from the English alphabet. 22 00:01:17,460 --> 00:01:21,254 Numbers are fine anywhere in the file name. 23 00:01:21,254 --> 00:01:25,030 I can make a directory named 1st_directory with a 1 at the start. 24 00:01:26,300 --> 00:01:29,722 I can make another directory named directory_2 with a 2 at the end. 25 00:01:32,044 --> 00:01:36,160 Punctuation other than dashes and underscores should be avoided. 26 00:01:36,160 --> 00:01:39,940 A period or a dot is okay before the file extension, but 27 00:01:39,940 --> 00:01:41,740 should otherwise be avoided. 28 00:01:41,740 --> 00:01:44,379 A dot at the start of a file name makes the file hidden. 29 00:01:45,810 --> 00:01:50,260 Spaces are legal in file or directory names, but you should avoid them. 30 00:01:50,260 --> 00:01:54,153 Let me change to the library directory's fiction subdirectory to demonstrate. 31 00:01:57,386 --> 00:02:02,188 Let's say I wanted to create a directory for the author Peter F Hamilton. 32 00:02:02,188 --> 00:02:05,400 mkdir peter f hamilton. 33 00:02:05,400 --> 00:02:10,030 If I list files now, you'll see there are three new separate directories. 34 00:02:10,030 --> 00:02:13,080 There they are, peter, f, and hamilton. 35 00:02:14,510 --> 00:02:18,470 That is definitely not what we wanted, so let me get rid of those. 36 00:02:18,470 --> 00:02:22,715 Remove recursively f/ hamilton, and peter. 37 00:02:26,162 --> 00:02:30,047 I can create a single directory with spaces in the name by surrounding it 38 00:02:30,047 --> 00:02:30,710 in quotes, 39 00:02:30,710 --> 00:02:32,970 so it's treated as a single argument. 40 00:02:32,970 --> 00:02:35,711 mkdir "peter f hamilton" with quotes. 41 00:02:37,675 --> 00:02:42,336 Listing file shows just one new directory, peter f hamilton. 42 00:02:42,336 --> 00:02:46,432 But unless I also surround the directory name with quotes when attempting to change 43 00:02:46,432 --> 00:02:48,129 into it or otherwise work with it, 44 00:02:48,129 --> 00:02:52,970 the command will fail because the name gets treated as three separate arguments. 45 00:02:52,970 --> 00:02:54,470 So that's not going to work well. 46 00:02:54,470 --> 00:02:55,990 Let me get rid of that directory. 47 00:02:55,990 --> 00:02:59,583 Remove, recursively, quote peter f hamilton, end quote. 48 00:03:01,999 --> 00:03:05,772 Instead if a file or directory name has multiple words, 49 00:03:05,772 --> 00:03:11,165 it's better to separate them with underscores, mkdir peter_f_hamilton. 50 00:03:13,367 --> 00:03:20,377 Or sometimes you'll see dashes used instead, mkdir peter-f-hamilton. 51 00:03:20,377 --> 00:03:24,850 This makes it clear that the whole file or directory name is a single argument. 52 00:03:24,850 --> 00:03:28,680 To avoid confusion, you should pick one of these two standards and stick with it. 53 00:03:28,680 --> 00:03:29,945 Don't mix the two. 54 00:03:29,945 --> 00:03:35,303 I am gonna go ahead and get rid of the peter-f-hamilton directory.