Monday, August 9, 2021

some bash alias I found very useful

 # User specific aliases and functions

alias showheader='head -1|tr "," "\n" | tr "|" "\n" |tr "^" "\n" |  nl -ba | less'

alias pnfc='awk -F"," "{print NF}"'

alias pnfp='awk -F"|" "{print NF}"'

alias mytop='top -u <username>'

alias cl='clear'

alias head5='head -5'

alias head2='head -2'

alias head1='head -1'

alias lsht='ls -lsh --sort=time'

alias lshs='ls -lsh --sort=size'

alias savehist='history | tail -2 | head -1 >> NOTES'

alias x='chmod +x'

alias ssactivate='source activate <env name>'

alias cls='clear'

alias lsl='ls -alh --color=auto'

alias du='du -h'

alias df='df -h'

alias jnotebook='jupyter notebook --port 8890 --no-browser'

alias screenkillall='screen -ls | grep pts | cut -d. -f1 | awk "{print $1}" | xargs kill'

alias screenkilldetached='screen -ls | grep Detached | cut -d. -f1 | awk "{print $1}" | xargs kill'

alias savedate='echo ~~~~~~~~~~~~~~~~~~~~$(date)~~~~~~~~~~~~~~~~~~~~ >> NOTES'

dec(){

    openssl des3 -in "$1" -d -pass pass:<password>

}

export -f dec

No comments:

Post a Comment

Any comments?

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...