-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
75 lines (65 loc) · 2.71 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Instalacao das Funcoes ZZ (www.funcoeszz.net)
export ZZOFF="" # desligue funcoes indesejadas
export ZZPATH="/home/gfigueir/redhat/git/myscripts/funcoeszz-13.2.sh" # script
source "$ZZPATH"
# Variables
export PS1="[\W]\$ "
export PATH=$PATH:~/redhat/scripts::~/redhat/git/myscripts/rh
export HISTSIZE=9999999
#export PROMPT_COMMAND='history -a; history -n; echo -n "pwd: "; pwd; echo ""'
# power aliases
alias psg="ps kstart_time -ef"
alias ds="dstat -c -D sda -r --disk-util --top-bio --top-io-adv"
alias jbacik="ps auxH -L | grep \" D\" | awk '{print $3}' | xargs -I '{}' bash -c \"echo '{}'; cat /proc/'{}'/stack\" > /tmp/pid_stack.out"
# User specific aliases
alias edit_alias="vi ~/.bashrc;. ~/.bashrc"
alias l="ls -l"
alias lr="ls -ltr | tail -40"
alias ssh="ssh -X -o TCPKeepAlive=yes"
# Red Hat specific aliases
alias dropbox="lftp ftp://[email protected]"
alias fubar="ssh -c blowfish [email protected]"
alias optimus="ssh [email protected]"
alias gg="/home/gfigueir/redhat/git/support-scripts/internal/gg"
alias csr="vi ~/redhat/git/myscripts/csr"
alias rhst="redhat-support-tool"
alias rter="printf '\e[8;40;105t'"
alias rh="cd ~/redhat/git/myscripts/rh"
alias p="dbus-send --session --dest=org.hexchat.service --print-reply --type=method_call /org/hexchat/Remote org.hexchat.plugin.Command string:'msg #gss-emea'"
alias c="~/redhat/git/myscripts/csr -m|less"
alias x="xsos -ay .|more"
# User specific Functions
kb() { redhat-support-tool kb $1 | less ; }
loc() { find . -name "*$1*" ; }
new() { mkdir ~/redhat/cases/$1; rhst getattachment -c $1 -asm -d ~/redhat/cases/$1 ; cd ~/redhat/cases/$1 ; }
cdc() { if [ -d ~/redhat/cases/$1 ]; then cd ~/redhat/cases/$1 ; ls -l ; else mkdir ~/redhat/cases/$1; cd ~/redhat/cases/$1 ; ls -l ; fi ; }
erpm() { rpm2cpio $1 | cpio -idmv ; }
eimg() { bzcat $1 | cpio -idmv img.$1 ; }
iexec() { tmp_file=`mktemp`; \
curl -s "$1" -o $tmp_file ; \
chmod +x $tmp_file ; \
$tmp_file; \
rm -f $tmp_file ; }
eexec() { iexec http://etherpad.corp.redhat.com/ep/pad/export/${1}/latest?format=txt ; }
# tshark functions
t_con() { tshark -tad -r $1 -z "conv,tcp" -q ; }
t_phs() { tshark -tad -r $1 -z "io,phs" -q ;}
t_exp() { tshark -tad -r $1 -z "expert,note,tcp" -q ; }
# History specific command
shopt -s histappend
set -o emacs
# Aarav functions
#cco() { DATE=`date +%Y%m%d-%H%M` ;
# vi ${DATE}.txt ;
# echo File created ${DATE}.txt ;
# gpaste file ${DATE}.txt ; }
#
#ec() { LOCAL_FILE=`ls -tr *.txt | tail -1` ;
# vi $LOCAL_FILE ;
# echo Finishing editing $LOCAL_FILE ;
# gpaste file $LOCAL_FILE ; }