{ads}

Saving commands to a file using Ctrl-x-e



March 10, 2023 at 02:31AM

One very interesting trick that you may not know is that you can type a line of text (presumably a command) on the Linux command line and immediately save it to a file by pressing just three keys. The editor that will open up will depend on your $EDITOR setting that you can view using the command shown below:

$ echo $EDITOR
nano

If you prefer to use a different editor, use a command like this before typing or moving back to the command that you want to save:

$ export EDITOR=vi

And don't forget to save this change to your .bashrc (or other start-up file) if you want to make this change permanent. For example:

To read this article in full, please click here



from Network World https://ift.tt/6k2QGsM

0 Response to "Saving commands to a file using Ctrl-x-e"

Post a Comment

Article Top Ads

Central Ads Article 1

Middle Ads Article 2

Article Bottom Ads