ubuntu
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
Was this helpful?
Similar Posts
- Copy all folder content to another folder In Ubuntu
- Remove or Delete a folder or directory in Ubuntu
- Get total size of a directory or folder in Ubuntu
- Change directory name or rename a directory in Ubuntu
- Copy a directory along with its content to another directory in Ubuntu
- Find all empty directories in a directory in Ubuntu
- Delete all empty directories in a directory in Ubuntu