![]() |
[help] Xterm: How to save a command ?
I searched round and couldnt find the appropriate place to ask.
Once ive run a command in xterm it sometimes remembers previous commands and when i open xterm and keep pressing the up key it shows a few previous commands.What can i type so it remembers a specific command when i open xterm? e.g im running psx4m but it doesnt seem to keep that specific command in memory after running psx4m and closing xterm. Any help appreciated:o |
Re: [help] Xterm: How to save a command ?
If you type 'exit' at the prompt it will be there next time. If you hit the X it won't.
If you want to save it as a command you could create it as a script and then open Term and type ./myscript To be further helpful if you need it: type out the command with "echo " in front. Eg, echo /the/full/command/typed here >psx4m.script Then type chmod +x psx4m.script So you can open a terminal and type ./psx4m.script |
Re: [help] Xterm: How to save a command ?
If you type 'history' (without the quotes) in your x-term, it'll pop up a list of the last 500 commands you've attempted to execute. Each one is numbered.
Say you scroll back in the list a bit and you see psx4m is number 437, in your x-term simply type: !437 (and hit enter) It'll run that command. You can also create aliases in your shell config file - for bash it's .bashrc (if you are root), for the 'user' account I believe you can use .profile - though don't quote me on that : ) |
Re: [help] Xterm: How to save a command ?
history didnt work for me:(
|
Re: [help] Xterm: How to save a command ?
Quote:
Even as root |
Re: [help] Xterm: How to save a command ?
Command history is stored in .ash_history file.
To get command history, You can press Alt + up/down arrow to get the last command, but it has a limit of storing only last 15 commands. This has already been filed a bug for this. |
Re: [help] Xterm: How to save a command ?
Quote:
The default n900 shell only saves a few commands, and the history command is not a part of the default shell. |
Re: [help] Xterm: How to save a command ?
Quote:
|
All times are GMT. The time now is 02:52. |
vBulletin® Version 3.8.8