Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any scripts or tools that can automatically remember and write down the path I am? I asked because, when I was remote accessing my campus cluster via ssh last night, they will log me out every eight hours if I did nothing. I hope when I log in back again this morning, I would be in the folder where I was last night. Thanks

share|improve this question

migrated from stackoverflow.com Mar 14 '13 at 9:16

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 5 down vote accepted

You can use screen tool (to create a session do: screen -S myscreen) and have the session alive even if you are forced to disconnect. So when you login next time, you can do screen -r or screen -x to connect back to your session.

Unless you reboot the system or exit manually, the screen session will be active.

share|improve this answer
add comment

If the server has GNU Screen, use it. Also, there are sometimes environment variables that can be set or unset to prevent automatic logouts, depending on how your server is setup. I am in a tcsh and have this in my ~/.cshrc:

unset autologout 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.