TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    Linux commands

    mkdir Unix Command

    Overview

    In this tutorial, we will learn mkdir Unix Command with examples. We can run the command on a Linux machine as well. To run the command launch the Terminal or Konsole.

    mkdir Unix Command

    mkdir is the short form for “make directory”. The mkdir command creates one or more directories.

    Command Format

    The command format:

    $ mkdir <flags> directory_list

    To know more about the command, type the man

    $ man mkdir

    The directory_list is the paths of the directories that the mkdir command creates. The user must have permission to write and execute permission on the parent directory of the “would be created directory”.

    Examples

    Simple command to create a folder called ‘automation’ under the present working directory.

    $ mkdir automation

     

    mkdir Linux command

    This command will create a directory called automation in the present working directory. We can use the pwd command to know the present working directory. To create under a specific directory, we need to change the directory using the cd command.

    When we create a new directory using the mkdir command, two entries are automatically created. These directory entries are hidden by default.

    The entries are:

    • single dot( . )
    • double dots( .. )

    Create a sample directory with the mkdir command and list the contents with ls -a command.

    New Directory Hidden Entries Linux

    The single dot represents the current working directory itself.
    The double dots represent the parent of the working directory.

    -p parent

    We can also create a parent directory with the mkdir command. We can use the -p option to create the parent directory of the subdirectory that we are creating.

    $ mkdir -p testplan/testcases

    mkdir unix command

    We can notice that both ‘testplan’ and ‘testcases’ directories are created by the command. In this example, ‘testcases’ is the subdirectory of the parent directory ‘testplan’.

    Now to create a directory under testplan we can omit the -p flag.

    $ mkdir testplan/testresults

    –

    Linux Commands Tutorial page:

    https://www.testingdocs.com/linux-basic-commands-tutorial/

    More Information on Ubuntu Linux:
    https://ubuntu.com/

    Related Posts

    sudo auth log entry

    Linux commands /

    sudo Linux Command with Examples

    Common File Commands in Linux

    Linux commands /

    Common File Commands in Linux

    su linux command

    Linux commands /

    su Linux Command

    ls linux command

    Linux commands /

    ls Linux Command with Examples

    touch create file

    Linux commands /

    touch Linux Command

    ‹ cat Linux command with Examples› ps Linux command

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com