You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
dotfiles/.aliases.d/nice_stuff.sh

76 lines
2.2 KiB

## You should use these on servers instead of default commands...!!
#set nice levels for common commands
#The niceness value ranges from -20 (highest priority) to 19 (lowest priority).
#A value of 2 is close to the default priority (0).
#A value of 17 is close to the lowest possible priority (19).
alias speed-up='echo -e "Grant Import-Fastest-CPU-time-to-process-this-task \r\n"; sudo nice -n -19'
alias speed-down='echo -e "Mark this as slowest-yelding-background-process-task \r\n"; nice -n 19'
alias ncfg='nice -n 2 ./configure'
alias nmake='nice -n 2 make'
alias nmakeinstall='sudo nice -n 2 make install'
alias ncp='nice -n 17 cp -iv'
alias nmv='nice -n 17 mv -iv'
alias nrm='nice -n 17 rm -I --preserve-root'
alias ncurl='nice -n 17 curl'
alias nl='nice -n 17 ls --color=auto -alh'
alias nn='nice -n 17 nano'
ng() {
nice -n 17 geany $1 &
}
alias no='nice -n 17 less'
alias nless='nice -n 17 less'
alias ngrep='nice -n 17 grep --color=auto'
alias nhg='history | nice -n 17 grep --color=auto'
#NICE apt-get
alias nagi='sudo nice -n 2 apt-get install'
alias nagr='sudo nice -n 2 apt-get remove'
alias nagu='sudo nice -n 2 apt-get update'
alias nacs='nice -n 2 apt-cache search'
#NICE RSYNC
alias nbackup="nice -n 2 rsync --progress -ravz"
alias nrsync="nice -n 2 rsync"
#NICE git
alias ngs='nice -n 17 git status'
alias ngc='nice -n 17 git commit -a -m'
alias nmpull='nice -n 17 git pull origin master'
alias nmpush='nice -n 17 git push origin master'
alias npull='nice -n 17 git pull origin'
alias npush='nice -n 17 git push origin'
alias ngb='nice -n 17 git branch'
alias nbranch='nice -n 17 git branch'
alias nclone='nice -n 17 git clone'
alias ncheckout='nice -n 17 git checkout'
alias ngitolite='nice -n 17 git clone gitolite:'
#NICE tar
nmaketar() {
if [ -e "$1" ]; then
nice -n 17 tar cvzf "$1.tgz" "$@"
else
if [ -e "$2" ]; then
x=""
for var in "$@"
do
if [ -e "$var" ]; then
x+=$var
x+=" "
fi
done
nice -n 17 tar cvzf "$1.tgz" $x
else
if [ -n "$1" ]; then
nice -n 17 tar cvzf "$1.tgz" *
else
nice -n 17 tar cvzf all.tgz *
fi
fi
fi
}
alias ntar='nice -n 17 tar'
alias nungz='nice -n 17 tar xvfz'
alias nuntar='nice -n 17 tar xvf'