I have a Debian 10.0 system. It has GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu). In Bash prompt, I type foo bar baz  Then I type alt + backspace two times. The words baz and bar get deleted and only foo remains. Then I type ctrl + / two times to undo the deletions. The words baz and bar reappear. How is ctrl + / working as the undo command? I don't see it defined anywhere? $ echo / | grep -E &quot;/|undo&quot;  # just testing my regex / $ bind -p | grep -E '/|undo' &quot;\e/&quot;: complete-filename &quot;\C-x/&quot;: possible-filename-completions &quot;/&quot;: self-insert &quot;\C-x\C-u&quot;: undo &quot;\C-_&quot;: undo
122814
I have a Debian 10.0 system. It has zsh 5.7.1 (x86_64-debian-linux-gnu). In ZSH prompt, I type foo bar baz  Then I type alt + backspace two times. The words baz and bar get deleted and only foo remains. Then I type ctrl + / two times to undo the deletions. The words baz and bar reappear. How is ctrl + / working as the undo command? I don't see it defined anywhere? $ echo / | grep -E &quot;/|undo&quot;  # just testing my regex / $ bindkey -l .safe command emacs isearch main vicmd viins viopp visual $ bindkey -M .safe | grep -E &quot;/|undo&quot; $ bindkey -M command | grep -E &quot;/|undo&quot; $ bindkey -M emacs | grep -E &quot;/|undo&quot;  &quot;^X^U&quot; undo &quot;^Xu&quot; undo &quot;^_&quot; undo  I also have a macOS Catalina 10.15.7 with zsh 5.7.1 (x86_64-apple-darwin19.0) and ctrl + / does not do anything there.
85383
Update I can't even paste a b. I am trying to upgrade to Ubuntu 15.04 but I need to delete some files in the /boot directory. When I cd /oot I can't type a b. So, I thought, I will list the files in the / directory and copy/paste, but to no avail. I can't even paste a b. Update 2 I recently added some lines to the /etc/inputrc file in order to get better tab auto-completion: set completion-ignore-case on set show-all-if-ambiguous on TAB: menu-complete bind TAB:menu-complete   Original Question When I ssh into my ubuntu server I can't type the letter &quot;b&quot;. I can however type a capital &quot;B&quot; using either shift keys. I'm using a MacBook Pro with Retina display from 2012, and I'm ssh-ing into a custom built ubuntu box. It is here that I can't type a lower case &quot;b&quot;. I have restarted the server and yet I still can't type a &quot;b&quot;. Every other letter is fine. It hasn't done that before, I've had the server up and running for about two years and haven't come across an issue like this before. I also haven't done anything notable to cause it to do that. At first I thought the keyboard was a little sticky but when I closed the connection it works fine. I've restarted the server, ssh'd back in and the &quot;b&quot; key stops working again. I've tried my bluetooth keyboard and still no luck. Could this be something that is a rule in a .profile or .bashrc file or something similar? A setting to not allow certain characters. When I try to type the letter &quot;b&quot; I get the terminal bell sound as if it is not allowed.
35185
So, I've looked at history and at Ctrl+R, but they are not what I thought I knew. Is there a way that I can type in the beginning of a command, and cycle through the matches in my history with some bash shortcut?  # mysq(some shortcut key)   Gives me:  # mysqldump  --add-drop-table -e -q -n -C -u  (some shortcut key) #  mysql -u ben.dauphinee -p
25143
The expression .* is expanded by bash to include the current and parent directories:  $ ls -la total 2600 drwxrwxrwx   2 terdon terdon 2162688 Sep 10 16:22 . drwxr-xr-x 142 terdon terdon  491520 Sep 10 15:34 .. -rw-r--r--   1 terdon terdon       0 Sep 10 16:22 foo $ echo .* . ..   If I run rm -rf .* on my Debian using GNU bash, version 4.2.36(1)-release and rm from rm (GNU coreutils) 8.13, I get this message:  $ rm -rf .* rm: cannot remove directory: `.' rm: cannot remove directory: `..'   Is this a GNU thing or is it POSIX? Are there any *nix systems where the command above will silently delete . and ..?  Also, is this a safety feature of the shell or of the rm command itself?
72600
Recently it seems that shell has changed how it handles spaces in parameters. It used to handle them properly (Or at least as I intended it to), but now it recognises it as a bunch of different parameters and completely misses the escape character.  An example of a small script that used to work very well:  #!/bin/sh  exec /home/evan/.applications/Sublime\ Text\ 2/sublime_text $1   So I would give it some filepath with spaces and it used to open the proper file eg, /home/evan/Document/My\ File\ Path/file.txt would open that file.txt. Now it opens "My", "File", "Path", and some unknown "file.txt" Obviously, that won't be the file.txt that I am looking for.  Any help would be appreciated. Thank you in advance.  OS: Ubuntu 13.04 GNOME edition with latest updates  EDIT: I forgot to mention that the command executes perfect. The parameter does not.
70327
In the chat, we often use backticks highlight code inside of sentences, exactly like how we do it here.  Unfortunately, it's located peculiarly close to the esc key, which has a nasty effect of clearing the chat input.  Outside of making a userscript, would it be alright to disable that effect so that I (and probably a bunch of others) don't throw my computer out the window when I lose a larger post to a misplaced keystroke?  Note: command+z (OSX) does not undo the delete.
26600
On the bash command-line, ↑ gives me the previous command. On the command-lines in ipython or matlab, when I type a few characters, ↑ gives me the previously entered command starting with those characters. How can I enable exactly this behaviour in bash? I am aware of more advanced ways of searching through the command-line history, but sometimes a simple way is more convenient.
123826
There's something odd about my autocomplete in the gnome terminal.  I used to be able to type cp Downtab to get cp Downloads/, and then type Jettab to end up with cp Downloads/Jet\ Pack\ Instructions.pdf  But now, when I have cp Down typed and hit tab, I get cp Downloads with a space afterwards. And if I backspace that and make it say cp Downloads/Jet and hit tab, I get cp Downloads/Jet Pack Instructions.pdf without the backslashes.  It wasn't like this before. How do I fix this?  EDIT: There's a problem with my /etc/bash_completion file, it seems. Just not sure what.
8536
To do a patch manually I must type this command   sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql     There is a space just before the 09:   sudo ./playback_delete_data_patch.sh [space] 09_delete_old_data_p.sql   How can I run this inside a script?  There are also several other commands but this one is giving trouble.
56245
Studying  I am unable to reconstruct the following shell output in bash 4.4.12 in debian 9, both from tty and pts:  bash$ lsof -a -p $$ -d0,1,2 COMMAND PID     USER   FD   TYPE DEVICE SIZE NODE NAME  bash    363 bozo        0u   CHR  136,1         3 /dev/pts/1  bash    363 bozo        1u   CHR  136,1         3 /dev/pts/1  bash    363 bozo        2u   CHR  136,1         3 /dev/pts/1   bash$ exec 2&gt; /dev/null bash$ lsof -a -p $$ -d0,1,2 COMMAND PID     USER   FD   TYPE DEVICE SIZE NODE NAME  bash    371 bozo        0u   CHR  136,1         3 /dev/pts/1  bash    371 bozo        1u   CHR  136,1         3 /dev/pts/1  bash    371 bozo        2w   CHR    1,3       120 /dev/null   Whenever I run the second command the shell prompt disappears and all keyboard input stops being displayed, though I can still run commands and see their output. Why is that?
84980
I accidentally typed ctrl + L in terminal and my terminal window jumped one 'screenful' size. I looked at the keyboard shortcuts in "Edit"->"Keyboard shortcuts" and didn't find that shortcut.  What does ctrl + L do and where is it defined?
44271
Possible Duplicate:          Is there a short-cut in bash that lets you delete the last part of a path?  Example: /usr/local/bin should become /usr/local/ (or /usr/local)  I know of Ctrl+w but it deletes the complete last word and I'd like to retain that functionality, too.
97275
I define a shell keybinding in my ~/.bashrc like so:  bind -x '"\e\C-w":"/usr/bin/reset"'   This does make Ctrl-Alt-w launch the reset executable. However, it leaves the terminal in a state that resembles the one you get into by pressing Ctrl-v. So, for example, if immediately after resetting in this way I press Ctrl-p, instead of invoking the action of that shortcut (repeat previous command) I get ^P printed.  Any idea what's causing this problem and how to fix it?  EDIT: I am attaching a Python program that reproduces the messed-up terminal state I am trying to fix with the reset. I encounter this condition very often while debugging multi-threaded applications:  import pdb, thread, time  def interrupt():     time.sleep(2)     pdb.set_trace()  thread.start_new_thread(interrupt, ()) raw_input('? ')   To reproduce the messed-up state, just run the code above, and press Enter when you see the debugger invoked (it will print a bunch of text, ending with pdb.set_trace(), about two seconds after you run the program and the initial prompt appears).
121768
I'd like to do a one line bash command that automatically does this:  screen -S myserver  python myserver.py  # inside the new screen CTRL A, D (detach)   I think this won't work:  screen -S myserver &amp;&amp; python myserver.py   because python myserver.py won't be started inside the screen.
31858
Often when I start looking at history of commands some of the characters from a command displayed aren't erased, for example:  What's happening:  prompt$ some_command prompt$ some_commanother_command   What should have happened:  prompt$ some_command prompt$ another_command   I can't erase those characters and bash ignores them when executing the command. They also disappear when a new prompt is being displayed (after pressing Enter for example).  I asked other people who work on Linux at my workplace and they said that they have that problem sometimes too, but they didn't have an idea on how solve that issue.  I have Ubuntu 11.10 and I'm using guake. Here is my PS1:  \e[0;31m\u \A ${PWD##*/}\e[0;32m$(parse_git_branch)\e[0;31m$\e[m   where parse_git_branch is  parse_git_branch () {     git name-rev HEAD 2&gt; /dev/null | sed 's#HEAD\ \(.*\)# (\1)#' }   As far as I know my colleagues have that problem even with less "fancy" PS1.
55610
I use terminal for almost all tasks. Let's say I have entered a huge command like this:  sudo a-huge-command   What is the easiest way to delete the whole command with a single shortcut, rather than keep on hitting backspace key?  I'm a Ubuntu newbie looking to use Ubuntu in a professional way.
64001
The find command seems to differ from other Unix commands.  Why is there the empty curly brackets and a backward flash at the end of the following command?  find * -perm 777 -exec chmod 770 {} \;   I found one reason for the curly brackets but not for the backward flash.   The curly brackets are apparently for the path     Same as -exec, except that ``{}'' is   replaced with as many pathnames as   possible for each invocation of   utility