Saving stuff to a text file

If I do a "history" and get a list of commands that I've done before, can I save them to a text file? If not, then would there be any other ways around this? Also, what's a snapshot?

Thanks in advance.

all history commands are saved in a file called

you can copy that to a text file...

Is .sh_history stored in the root?

It's saved in the home directory of the user who owns it. It may be .bash_history if you are using bash.

Have you tried just doing a history > somefile?

Regarding the snapshot question, what is the context? Snapshot is used to describe many things...

dear Annihilannic
history won't give all history details it gives by default some 20 or 30 history commands so i suggested him to copy .sh_history file to text file..

If you want more you can specify the number:

history -100 > somefile

Annihilannic: I was referring to a file called ".snapshot". I was confusing it with the ".sh_history" file. I still don't know what a snapshot file is, but I doubt it has anything to do with history.

Anyway, "history > somefile" works just file. Thanks everyone.