Linux - Make directory and then change into it, Function to create and change directory

Make directory and then change into it

How often do you make a directory (or series of directories) and then change into it to do whatever? 99% of the time that is what I do.

Command to create a directory and change to it
 # md () { mkdir -p "$@" && cd "$@"; }
This BASH function 'md' will make the directory path then immediately change to the new directory. By using the 'mkdir -p' switch, the intermediate directories are created as well if they do not exist

Create a directory and change into it at the same time
 # mkcd () { mkdir "$@"; cd "$@"; }
        
    

The topic on Linux - Make directory and then change into it is posted by - Patel

Hope you have enjoyed, Linux - Make directory and then change into itThanks for your time

Tech Bluff