December 17, 2020
If you want to create a directory using bash (in the terminal), but you don't know whether it'll already exist so you only want to create it if the directory doesn't exist yet:
mkdir -p directory
mkdir -p my/directory/here
You can use this with a top-level directory (the first example), or with a deeply nested directory (the second example).
The -p
flag creates all directories necessary along the way (for example my
, directory
, and here
) if they don't exist yet.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!