Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

One command to create a directory and file inside it linux command

$ echo 'mkfile() { mkdir -p "$(dirname "$1")" && touch "$1" ;  }' >> ~/.bashrc
$ source ~/.bashrc
$ mkfile /your/directory/yourFile.txt
 
PREVIOUS NEXT
Tagged: #One #command #create #directory #file #linux #command
ADD COMMENT
Topic
Name
1+1 =