I know I can do
mdkir -p a/b/c/d
However time and again I need to put a file in a new directory. So this is what I do
mkdir -p a/b/c
touch a/b/c/foo.txt
I was wondering if there is an easy way to combine those two operations.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Bash shell, create a function in your .bashrc file.
Then just call mktouch a/b/c/foo.txt