Skip to main content

Bash Alias

mac file location

.bash_profile

Oh-my-zsh

.zshrc

to refresh after changes

source ~/.bash_profile

show ll in testa file

grep ll testa

doesnot contain ll in testa file

grep -v ll testa

show with line number -n flag

grep -n ll testa

list file name contains current work directory

grep -l ll *

list file name contains current work directory - ignore case sensitive

grep -i ll *

count number of ll in each file in cwd

grep -c ll *

add line number each line of testa file

grep -n '^' testa