Given a file path (e.g. /src/com/mot), how can I check whether mot exists, and create it if it doesn’t using Linux or shell scripting??
Given a file path (e.g. /src/com/mot ), how can I check whether mot exists,
Share
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.
With bash/sh/ksh, you can do:
For files, replace
-dwith-f, then you can do whatever operations you need on the non-existant file.