1

I am trying to create a temporary directory using mktemp -d but it is not creating a directory. When I try to run cd $(mktemp -d) it takes me to my home folder. This behavior is similar to cd .

When I try to run mktemp -d and check the exit code using echo $? it return 248 as the exit code.

What is going on?

starball
  • 20,030
  • 7
  • 43
  • 238
physio
  • 109
  • 1
  • 13

1 Answers1

0

Most likely $(TMPDIR) is set to a non-existent directory or one to which your user lacks write+execute permissions.

Dan Bonachea
  • 2,408
  • 5
  • 16
  • 31