Recommended bash aliases
Revision as of 13:45, 27 February 2009 by import>Jg525
~wales/.bashalias
Copying ~wales/.inputrc to your home directory will also reduce your typing. It sets up ESC then . as the last item on the previous line and ESC then , and backward search in history matching the start of what you have already typed.
Function to remove filename extensions
Place
# rm filename extension function rmext() { find . -mindepth 1 -maxdepth 1 -type f | grep $1 |\ sed 's/\(.*\)\..*/\1/' | xargs -I {} mv {}.$1 {}; }
in ~/.bash_aliases or ~/.bashrc then
source ~/.bashrc
Usage
$ rmext <extension>
Example
$ ls -1 first.file.test second.file.test important.file
$ rmext test $ ls -1 first.file second.file important.file
xpdf
# fit width and set geometry alias xpdf="xpdf -z width -geometry 1000x1000"