Linux: copy and create destination dir if it does not exist September 13, 2022 by Tarik mkdir -p "$d" && cp file "$d" (there’s no such option for cp).