TweetThe history Command The history command remembers the last 1000 commands that you have performed at the command line. The value of the history command is that you can go back and review a...
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.
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.
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.
In Ubuntu 12.04 I use CTRL-r to enter a reverse history search. If the command I want is not found (after repeated CTRL-r), how do I immediately exit back to the (empty) command prompt with no historical command entered or executed on the command line?
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:
basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command
i'd like to use vim style key shortcuts while on the command line so that a 55[left arrow key] moves the cursor 55 places to the left...
and i want all the other vi goodies, search of history maybe - a dream?, replace, etc
basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command
i'd like to use vim style key shortcuts while on the command line so that a 55[left arrow key] moves the cursor 55 places to the left...
and i want all the other vi goodies, search of history maybe - a dream?, replace, etc
Sometimes I need to reuse certain long arguments like paths.
If I use history search (CTRL+R), I may find some command that contains the path, but I still need to delete anything else in the old command, and then move cursor around to write the new command.