How to mkdir only if a directory does not already exist?

Try mkdir -p: Note that this will also create any intermediate directories that don’t exist; for instance, will create directories foo, foo/bar, and foo/bar/baz if they don’t exist. Some implementation like GNU mkdir include mkdir –parents as a more readable alias, but this is not specified in POSIX/Single Unix Specification and not available on many common platforms like macOS, various BSDs, and various commercial … Read more

sudo: apt-get: command not found

I am really struggling to get my head around terminal i keep getting commands not found what am i doing wrong? I am trying to install ruby on the mac using this tutorial. http://www.ruby-lang.org/en/downloads/ but i keep getting the error sudo: apt-get: command not found Can some please help me or give me an option to … Read more

subprocess.Popen(): OSError: [Errno 8] Exec format error in python?

Yesterday, I wrote and ran a python script which executes a shell using subprocess.Popen(command.split()) where command is string which constitutes .sh script and its argument. This script was working fine until yesterday. Today, I ran the same script and now I am continuously hitting this error. I know there are similar questions that have been asked before related to this question, but in … Read more

commands not found on zsh

It’s evident that you’ve managed to mess up your PATH variable. (Your current PATH doesn’t contain any location where common utilities are located.) Try: Alternatively, for “resetting” zsh, specify the complete path to the shell: or

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)