From local computer

.bashrc

# -*- mode: sh -*-
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH

# Colors
export LC_ALL=C
export LANG=C
export PS1="\[\033[38;5;34m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;21m\]\W\
\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;21m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\]\
\[$(tput sgr0)\]"
#export PS1="\[\033[0;32m\]\u@\$HCHOSTNAME\[\033[0;34m\] \w \$\[\033[00m\] "


#Functions and Aliases
if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
fi

.bash_aliases

export DISPLAY=localhost:0.0

alias cmstunnelp5='ssh -t darcaro@lxplus.cern.ch -L1080:localhost:1080 "ssh -D 1080 darcaro@cmsusr"'

alias lx='ssh darcaro@lxplus.cern.ch'

#CMS MACHINES
cms () {
    ssh -X djarcaro@cms$1.bu.edu
}

sun () {
    ssh -X djarcaro@cmssun$1.bu.edu
}

#t3 machines
t3 () {
    ssh djarcaro@$1.bu.edu
}

LXPLUS

.bashrc

# -*- mode: sh -*-
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH

# Colors
export LC_ALL=C
export LANG=C
export PS1="\[\033[38;5;34m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;21m\]\W\
\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;21m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\]\
 \[$(tput sgr0)\]"
#export PS1="\[\033[0;32m\]\u@\$HCHOSTNAME\[\033[0;34m\] \w \$\[\033[00m\] "


#Functions and Aliases
if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
fi

.bash_aliases

# -*- mode: sh -*-

alias h='history'
alias ..='cd ..'
alias path='echo -e ${PATH//:/\\n}'
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}'
alias du='du -kh'    # Makes a more readable output.
alias df='df -kTh'

# Add colors for filetype and  human-readable sizes by default on 'ls':
alias ls='ls -h --color'
alias lk='ls -lSr'         #  Sort by size, biggest last.
alias lt='ls -ltr'         #  Sort by date, most recent last.
alias lc='ls -ltcr'        #  Sort by/show change time,most recent last.
alias lu='ls -ltur'        #  Sort by/show access time,most recent last.

# The ubiquitous 'll': directories first, with alphanumeric sorting:
alias ll="ls -lv --group-directories-first"
alias lm='ll |more'        #  Pipe through 'more'
alias lr='ll -R'           #  Recursive ls.
alias la='ll -A'           #  Show hidden files.
alias tree='tree -Csuh'    #  Nice alternative to 'recursive ls' ...

#-------------------------------------------------------------
# Tailoring 'less'
#-------------------------------------------------------------

alias more='less'
export PAGER=less
export LESSCHARSET='latin1'
export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
                # Use this if lesspipe.sh exists.
export LESS='-i -N -w  -z-4 -g -e -M -X -F -R -P%t?f%f \
:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'

# LESS man page colors (makes Man pages more readable).
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

function my_ip() # Get IP adress on ethernet.
{
    MY_IP=$(/sbin/ifconfig eth0 | awk '/inet/ { print $2 } ' |
      sed -e s/addr://)
    echo ${MY_IP:-"Not connected"}
}


cms () {
    cd ~/scratch/CMSSW_$1_$2_$3/src; cmsenv
}

eoscp () {
    xrdcp root://eoscms.cern.ch/$1 $2;
}

eosmnt() {
    /afs/cern.ch/project/eos/installation/pro/bin/eos.select -b fuse mount $1;
}

eosls () {
    echo "hello"

    if [ "$#" -eq 0 ]; then
        echo "Need more arguments"
        return
    fi
    AF=""
    long=""
    for iArg in "$@"
    do
        echo $iArg
        if [ "$iArg" == "-AF" ]; then
            AF="AnalysisFramework"
        fi
        if [ "$iArg" == "-l" ]; then
            long="-l"
        fi
    done

    echo "$AF  $long"
    eos ls $long /store/group/phys_smp/$AF/${@: -1}
}
alias tnp='cd /afs/cern.ch/work/d/darcaro/private/CMSSW_8_0_25/src; cmsenv; cd /afs/cern.ch/work/d/darc\
aro/private/CMSSW_8_0_25/src/MuonAnalysis/TagAndProbe/test/zmumu'

alias cmsgrid='voms-proxy-init -voms cms -valid 192:00 --hours 192'

alias shears='cd /afs/cern.ch/work/d/darcaro/private/CMSSW_8_0_26_patch2/src; cmsenv; cd /afs/cern.ch/w\
ork/d/darcaro/private/CMSSW_8_0_26_patch2/src/shears; source DYJets/setup.sh'

alias shearsop='cd /afs/cern.ch/user/s/shearsop/work'

alias work='cd /afs/cern.ch/work/d/darcaro/private/CMSSW_8_0_13_patch1/src; cmsenv; cd /afs/cern.ch/wor\
k/d/darcaro/private/CMSSW_8_0_13_patch1/src/analyzer'

alias rootwork='cd /afs/cern.ch/work/d/darcaro/private/root'

alias 904='ssh darcaro@cms904usr.cern.ch'

alias p5='ssh darcaro@cmsusr.cern.ch'

alias b28='ssh daq@cmshcal21.cern.ch'

alias h2='ssh daq@cmshcaltb02.cern.ch'

904

.bashrc

# -*- mode: sh -*-
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# HCAL environment + private bin
FILE=~hcalsw/bin/env.sh
PATH=$PATH:$HOME/bin
export PATH
if [ -f $FILE ]; then
    source $FILE
fi
# Alias for machine
source ~hcalsw/bin/getHCHostname.sh
export PS1="\[\033[0;32m\]\u@\$HCHOSTNAME\[\033[0;34m\] \w \$\[\033[00m\] "

# AMC13 address table
export AMC13_ADDRESS_TABLE_PATH=/opt/cactus/etc/amc13/

#Functions and Aliases
if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
fi

.bash_aliases

# -*- mode: sh -*-
# .bash_aliases

# Machines
alias logs='ssh cms904rc-hcal'
daq () {
    ssh hcal904daq0$1
}

# Log shortcuts
alias taillogs='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl'
alias taillogsW='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl --filter WARN'
alias taillogsE='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl --filter ERROR'

P5

.bashrc

# -*- mode: sh -*-
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# HCAL environment + private bin
FILE=~hcalsw/bin/env6.sh
PATH=$PATH:$HOME/bin
export PATH
if [ -f $FILE ]; then
    source $FILE
fi
# Alias for machine
source ~hcalsw/bin/getHCHostname.sh
export PS1="\[\033[0;32m\]\u@\$HCHOSTNAME\[\033[0;34m\] \w \$\[\033[00m\] "

#Functions and Aliases
if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
fi

.bash_alises

# -*- mode: sh -*-
# .bash_aliases

# Machines
alias utca='ssh hcalutca01'
alias logs='ssh cmsrc-hcal'
alias mon='ssh hcalmon'
vme () {
    ssh hcalvme0$1
}
alias chub_hf='ssh controlhub-hf-fec.cms'
alias chub_hbhe_fec='ssh controlhub-hbhec-fec.cms'
alias chub_hcal='ssh controlhub-hcal-daq.cms'

# Log shortcuts
alias taillogs='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl'
alias taillogsW='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl --filter WARN'
alias taillogsE='tail -f /var/log/rcms/hcalpro/Logs_hcalpro.xml | ~/Handsaw.pl --filter ERROR'

-- DanielArcaro - 17 Jul 2017

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 17 Jul 2017 - DanielArcaro
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback