Or, here's an even better alias.
alias jim=' \
journaldir="$HOME/journal" ; \
year="`date +%Y`" ; \
yearpath="$journaldir/$year" ; \
[[ -d "$yearpath" ]] || mkdir -p $yearpath ; \
jfile="log_`date -I`.md" ; \
jfilepath="$journaldir/$year/$jfile" ; \
header="# log_`date -I`\n\n# Highlights:\n\n" ; \
[[ -f "$jfilepath" ]] && echo "Opening log: $jfilepath" || { echo "Creating new log: $jfilepath" ; echo -e "$header" > $jfilepath ; } ; \
vi $jfilepath ; '
Copy this to your .bash_aliases file. It's fully automatic. It'll create the directories automatically.This will now create a /home/user/journal/YEAR/journalfile.md. It's now separated by year, so that you can run this forever, and have a maximum of 365 files per year directory.
This is a markdown file. And in the header variable, I had it fill in the new file with some basic headers. You can edit this yourself to add more.
Try it out, and let me know.