

If you forget to quote and type thecommand rmdir documents from work, FreeBSD will attempt to remove threedirectories named documents, from, and work. The command toremove a directory is rmdir. As I said before, FreeBSDinterprets a space as an argument separator unless it is quoted. You want to delete thedirectory called documents from work. For example, suppose that you have adirectory called documents from work, another directory just called documents, and a third one called work. This avoids the potential error of usingspaces in directory names.ĭirectory names that contain spaces also pose a potential danger for makingmistakes that can have unintended results. For the command to have the desired effect ofcreating a directory called "my dir", you need to type itlike this: mkdir "my dir"īecause typing quotation marks around directory names is inconvenient andalso error prone, I suggest that you avoid using directory names with spaces.One common solution is to use the underscore character instead of a space (forexample, "my_dir"). The result isthat the command will create two new directories one named my andthe other named dir. In other words, ifyou type the command mkdir my dir, FreeBSD will interpret the spacebetween my and dir as an argument separator. FreeBSDinterprets a space as an argument separator for the command. It is possible to create directory names that contain spaces, but in order todo so, you need to use quotation marks around the entire directory name. Note that all these rules apply to filenames as well. However, for the sake ofmaking things easier to work with, there are certain conventions that I suggestyou follow. Rules for Directory NamesįreeBSD has very few rules for directory names. This command creates a new directory in the current directory called mydir. In its most basic form, simply follow thecommand name with the name of the directory that you want to create.

The FreeBSD command for creating a new directory is mkdir. Because most people learn best by actually doing ratherthan just reading, I suggest that you follow along by logging in to your FreeBSDsystem using the user you created during the installation and try these commandsyourself. The following sections go through some of the basic file and directorymanipulation commands. Wildcards that do absolutely nothing in DOS could potentially delete everyfile in a directory in FreeBSD! Particularly important is the section on FreeBSDwildcards, which behave quite differently from DOS wildcards.
#FREEBSD COPY LOG FILE WINDOWS#
Even if you are an experienced Windows command-line user, you should at leastskim this section because some commands will not behave the way you would expectthem to behave in DOS.
