The mkdir command in Termux is your go-to architect for swiftly creating directories, streamlining your file organization with precision and ease.
Introduction: Creating directories is a fundamental task when working with the command line. In this tutorial, we’ll explore the “mkdir” command in Termux, a powerful tool for making directories effortlessly.
What is mkdir? The “mkdir” command stands for “make directory.” It allows users to create one or more directories in the specified path.
mkdir
To create a single directory, use the following syntax:
mkdir directory_name
Example: Let’s create a directory named “bhai” using the command:
mkdir bhai
on the above image we created a directory named “bhai” , and we can check the created directory by using ls command
Creating Multiple Directories:
To create multiple directories simultaneously, you can specify multiple names separated by spaces.
lets create three directories at same time ,and for example name them as documents, images,videos
mkdir documents images videos
mkdir -p
mkdir -p allows you to create a parent directory and children directory at once , and its syntax will be :
mkdir -p parent_folder/child_folder
Lets make use of this command by creating a parent directory named “parent” and children directory as “child”
mkdir -p parent/child
mkdir –help
this commands show all available other options but mostly used command is ls and mkdir -p in termux still you want to explore other commands then you can type below command in termux.
mkdir --help
Knowing the significance of the ‘mkdir’ command in Termux is key for creating directories. Unlike ‘ls,’ which lists existing files and folders, ‘mkdir’ is all about making new directories.
Understanding ‘mkdir’ helps you efficiently organize files in the current directory. While ‘ls’ is vital for viewing contents, ‘mkdir’ is crucial for structuring and managing your workspace in Termux.