Skip to content

Instantly share code, notes, and snippets.

@sprhawk
Created March 15, 2021 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sprhawk/d413abf71ade45f253eaecef55b0c7d6 to your computer and use it in GitHub Desktop.
Save sprhawk/d413abf71ade45f253eaecef55b0c7d6 to your computer and use it in GitHub Desktop.
change cwd of running process

Tricks

change cwd of running process

~ ps ax|grep tmux
~ lsof -p 8670 | grep cwd
~ gdb -q -p 8670
(gdb) call (int) chdir("/tmp")
(gdb) detach
(gdb) quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment