Followed up with
"but it was pretty simple, like under 30 lines"
So simple in fact, that it wasn't quickly rewritten and added to GitHub...
So simple in fact, that it wasn't quickly rewritten and added to GitHub...
Later disproved by the Banach-Tarski theorem. ;D
/dev/shm
The advantage being that it does not even touch the disk. cdtmp() {
cd $(mktemp -d)
}So I took your tip and now I have
cdtmp() {
local name
name=/tmp/$(diceware --no-caps -d - -n 2)
mkdir $name && cd $name
}
I decided not to worry about the directory existing already, or of the other checks mktemp -d would do for me in my single-user system.. I suppose mktemp -d -t cdtmpXXX would work almost as well. Thanks for the idea!