Currently on pressing arrow keys or Ctrl+P/N, I see characters like
ftp> ^[[A
ftp> ^[[B
ftp> ^P
ftp> ^N
I would like to know, how to configure the ftp prompt so that I am able to view the previous commands just like we do on other shells (e.g. Ctrl+P/N in bash or arrow keys)
Yesterday we introduced your to Linux command line console or shell in our previous post. To read that post, click here.
Today we will continue from where we left off and expand a little into more advanced commands.
Using the stock terminal or Roxterm ...
Has anyone had issues with the command line history, under Fedora 18, with regard to using the up and down arrows to go back and forward in said history? When I cycle through a few of the last commands my command line becomes unreadable, with commands overlapping one another.
Is there any way to store a command in bash history permanently? The actual scenario goes like this:-
I have a project in C and in order to configure my project, I have to run a very long command which is very difficult to remember. Once configured and build, I don't need that command for almost a month or so.
Linux offers a lot of power to users, especially from the command line. Because of this, some of the commands can get long and hairy. It would be nice to have a way so that you didn’t have to type those long ones out every time. Also, wouldn’t it be great to be able to search through your command history for that one really cool one? Luckily, we have some ways to do these things.
Few tips to use with bash command history.
Erase duplicates in your history file
If you repeat some times the same command, like I usually do when checking memory with
free -m
You will end up with a lot of those command repeated through your command history, and if you type
history
You may see an output like this:
FIXME work in progress...
Nearly everything in Bash grammar can be broken down to a so-called "simple command". That's why the only thing Bash has to finally expand, evaluate and execute is the simple command.
Simple command expansion
This step happens after the initial command line splitting.
Is there any way to configure Bash to print a newline or horizontal line after commands that provided more than N lines of output? For instance, after a simple cd I don't need a newline or horizontal line, but after a long cat a visual indication of the end of each command's output would be great when I am comparing the output of various commands.
Thanks.
Linux's head selects a number of lines from the top of a file.