$ mkdir mydir
$ file mydir
mydir: directory
$ ls -l
drwxrwxr-x. 2 localuser localuser 6 Jun 9 14:47 mydir
$ cd mydir/
$ pwd
/home/localuser/mydir
$ ls -l
total 0
mkdir newdirectory
C:>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 3 15:07:01 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - Production
SQL> create or replace directory MYCSV as 'e:mycsv';
Directory created.
SQL> grant read, write on directory MYCSV to scott;
Grant succeeded.
# Python program to explain os.mkdir() method
# importing os module
import os
# Directory
directory = "GeeksforGeeks"
# Parent Directory path
parent_dir = "D:/Pycharm projects/"
# Path
path = os.path.join(parent_dir, directory)
# Create the directory
# 'GeeksForGeeks' in
# '/home / User / Documents'
os.mkdir(path)
print("Directory '% s' created" % directory)
# Directory
directory = "Geeks"
# Parent Directory path
parent_dir = "D:/Pycharm projects"
# mode
mode = 0o666
# Path
path = os.path.join(parent_dir, directory)
# Create the directory
# 'GeeksForGeeks' in
# '/home / User / Documents'
# with mode 0o666
os.mkdir(path, mode)
print("Directory '% s' created" % directory)
# Python program to explain os.makedirs() method
# importing os module
import os
# Leaf directory
directory = "Nikhil"
# Parent Directories
parent_dir = "D:/Pycharm projects/GeeksForGeeks/Authors"
# Path
path = os.path.join(parent_dir, directory)
# Create the directory
# 'Nikhil'
os.makedirs(path)
print("Directory '% s' created" % directory)
# Directory 'GeeksForGeeks' and 'Authors' will
# be created too
# if it does not exists
# Leaf directory
directory = "c"
# Parent Directories
parent_dir = "D:/Pycharm projects/GeeksforGeeks/a/b"
# mode
mode = 0o666
path = os.path.join(parent_dir, directory)
# Create the directory 'c'
os.makedirs(path, mode)
print("Directory '% s' created" % directory)
# 'GeeksForGeeks', 'a', and 'b'
# will also be created if
# it does not exists
# If any of the intermediate level
# directory is missing
# os.makedirs() method will
# create them
# os.makedirs() method can be
# used to create a directory tree