Add image compression functions and qmv alias
This commit is contained in:
parent
d15048b8dc
commit
be45e954a3
2 changed files with 29 additions and 0 deletions
|
@ -11,6 +11,9 @@ alias ls='ls -F --color=auto'
|
||||||
# Make tree add indicators and color
|
# Make tree add indicators and color
|
||||||
alias tree='tree -F -C'
|
alias tree='tree -F -C'
|
||||||
|
|
||||||
|
# Make qmv open on 1 column mode
|
||||||
|
alias qmv='qmv -f do'
|
||||||
|
|
||||||
alias msfconsole="msfconsole --quiet -x \"db_connect msf@msf\""
|
alias msfconsole="msfconsole --quiet -x \"db_connect msf@msf\""
|
||||||
|
|
||||||
#Start cups
|
#Start cups
|
||||||
|
|
|
@ -188,3 +188,29 @@ searchphp() {
|
||||||
searchhtml() {
|
searchhtml() {
|
||||||
grep -r -i -n --color="always" --include=\*.{html,htm} "$1" .
|
grep -r -i -n --color="always" --include=\*.{html,htm} "$1" .
|
||||||
}
|
}
|
||||||
|
|
||||||
|
png() {
|
||||||
|
pngcrush -brute "$1"{,.} && du -b "$1"{,.}
|
||||||
|
}
|
||||||
|
gif() {
|
||||||
|
gifsicle -O "$1" -o "$1." && du -b "$1"{,.}
|
||||||
|
}
|
||||||
|
jpeg() {
|
||||||
|
jpegtran "$1" > "$1." && du -b "$1"{,.}
|
||||||
|
}
|
||||||
|
# Just for easy access in history
|
||||||
|
mpng() {
|
||||||
|
mv "$1"{.,}
|
||||||
|
}
|
||||||
|
mgif() {
|
||||||
|
newsize=$(wc -c <"$1.")
|
||||||
|
oldsize=$(wc -c <"$1")
|
||||||
|
if [ $oldsize -gt $newsize ] ; then
|
||||||
|
mv "$1"{.,}
|
||||||
|
else
|
||||||
|
rm "$1."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
mjpeg() {
|
||||||
|
mv "$1"{.,}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue