Search code snippets, questions, articles...

Create a new directory or folder in Ubuntu

The commands are helpful to create new folder or directory on Ubuntu.
# create new directory(in current folder)
-----------------------------------------------
mkdir directory_name
-----------------------------------------------

# To verify it---
-----------------------------------------------
ls -l
-----------------------------------------------

# create directory on a path(another location)
-----------------------------------------------
mkdir /path/to/folder/directory_name
-----------------------------------------------

# create directory along with it parent directory
-----------------------------------------------
mkdir -p /home/new_parent_direcory/directory_name
-----------------------------------------------
>> If we use -p with mkdir it will create the parent direcotry also if it does not exist
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place.
Was this helpful?
0 Comments