Tutorials Homepage

Tutorial 2 | Files and Directories

2.1 Creating Directories

When you want to store files in a new directory, you use the mkdir command to create a directory. To create a directory:

  1. First, type in the ls command to make sure that the planned name is not same as an existing directory or filename.
  2. Then, type in the mkdir command followed by a directory name to create a new directory. So, for example, type in
    mkdir Tutorials to create a new directory named Tutorials.
  3. If you want to make sure that the directory was created, type in the ls -l command to look at the listing for the new directory. Here, the -l flag specifies a long format. (See 2.3 for more detail.) In the listing, the d at the far left for the new directory tells you that it's a directory and not a file.
Here are some tips when creating a directory:

 

 

 

Go previous page                next pageGo

go to page:
|1|2|3|4|5|6|7|8|
getting started


files and directories Go


changing permissions


editors
























Take quiz

take quiz 2 >>