I'm asking a question in a very strange manner, i'm sorry. I know what i want, but i don't know exactly how it's called.
I hear somewhere that ubuntu (or linux) has hotkeys , shortcut to start flushing memory.
What i want: for example my laptop stop working, freezing, not responding. But i know that linux kernel is working, and before hot reboot i want do "safe reboot"
that means, i want sync everything in swap and in memory with my file system before hot reboot.
Also i know that i can kill my X using some hotkey.
I'm using Ubuntu 13.04
UPDATE according flamemyst answer
Thanks that was exactly what i want.
Just a little addition.
As i read, in Ubuntu some of Magic Commands can be disabled. This link will help How to enable commands