When I use "delete key" in some bash terminal, the key sends a tilde "~" instead of deleting the char that is supposed to be deleted.
Find a solution:
1. In your $HOME directory, create or edit your keyboard-mapping file, $HOME/.inputrc
2. Add one mapping line:
"\M-[3~": delete-char
3. restart your terminal
Sunday, April 11, 2010
Linux:bash:about "delete key"
Thursday, April 9, 2009
Linux:shell:BASH: How to delete one line by sed
If you want to delete one line containing one word "ThisWord" by sed, then you can do in the way:
sed -i "/ThisWord/d" YourTextFile.txt
Note, here '-i' is to delete it from the original file. Without it, sed only prints the file on screen. So before using '-i', make sure you are doing correct things.
Monday, August 18, 2008
Linux: /tmp cleanup frequency
kerberos is working well in my laptop. However, since the temp ticket file krb5*** is stored in /tmp which is cleaned up as reboot, I cannot use kinit -R to renew the ticket-granting ticket even within its renewable life. So what I do is to change /tmp cleanup frequency. How? edit the file:
/etc/default/rcS
and check the default value of "TMPTIME", 0 means cleanup as reboot. TMPTIME=14 means that the files in the directory will be deleted in a frequency of 2 weeks.
Sunday, September 30, 2007
emacs: how to delete a block of region
Mark (Ctrl+Space) the beginning of first line and move cursor to the the last line, and move it to the right n chars. Then do “Alt+x kill-rectangle” (Ctrl+x r k). This command can be used to delete any rectangular block of text, not just at the beginning of lines.
From: http://xahlee.org/emacs/emacs.html
Thursday, June 21, 2007
Linux:compress: restrictions about zipped tar files
From the tar's user guide:
Notice also, that there are several restrictions on operations on compressed archives. First of all, compressed archives cannot be modified, i.e., you cannot update (--update (-u)) them or delete (--delete) members from them. Likewise, you cannot append another tar archive to a compressed archive using --append (-r)). Secondly, multi-volume archives cannot be compressed.
