I have a directory
foo with several files:
. └── foo ├── a.txt └── b.txt
and I want to move it into a directory with the same name:
. └── foo └── foo ├── a.txt └── b.txt
I'm currently creating a temporary directory
bar and rename
mkdir bar mv foo bar mv bar foo
But this feels a little cumbersome and I have to pick a name for
bar that's not already taken.
Is there a more elegant or straight-forward way to achieve this? I'm on macOS if that matters.