On bash command-line, how to delete all letters before cursor?

On bash command-line, how to delete all letters before cursor? I know Ctrl-k deletes all afterward the cursor.

Answers


Ctrl-u - Cut everything before the cursor


Other Bash shortcuts,

  • Ctrl-a Move cursor to beginning of line
  • Ctrl-e Move cursor to end of line
  • Ctrl-b Move cursor back one word
  • Ctrl-f Move cursor forward one word
  • Ctrl-w Cut the last word
  • Ctrl-k Cut everything after the cursor
  • Ctrl-y Paste the last thing to be cut
  • Ctrl-_ Undo

Additional bash command-line shortcut cheat sheet: http://www.bigsmoke.us/readline/shortcuts

See the documentation here: http://www.gnu.org/software/bash/manual/bashref.html#Commands-For-Killing


Need Your Help

WebSocket live server

websocket

Does anyone happen to know of any live WebSocket servers which are accessible over the internet and listen on the standard ports (i.e. 80, and 443). Anything will do - an echo server, for instance.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.