 |
|
Oracle Tips by Burleson |
Creating new directories
The mkdir (make directory) command is used to create a new
directory. The directory to be created can be referenced via a
fully qualified path or via a relative path starting with the
current working directory. Here are some examples of each
method. Notice that the –p (parent) option allows creation of
a complete directory branch when parent directories do not yet
exist.
Make a directory using a full path:
$ ls
examples
$ mkdir /home/tclark/new_dir1
$ ls
examples new_dir1
$
Make a directory using a relative path:
$ mkdir new_dir2
$ ls
examples new_dir1 new_dir2
$
Make a new directory with a sub-directory using the –p option:
$ mkdir -p new_dir3/sub_dir3
$ ls
examples new_dir1 new_dir2 new_dir3
$ ls new_dir3
sub_dir3
$
The above book excerpt is from:
Easy Linux
Commands
Working Examples of Linux Command Syntax
ISBN:
0-9759135-0-6
Terry Clark
http://www.rampant-books.com/book_2005_1_linux_commands.htm |