An interesting site which shows the Big O notation for all many commonly used datatypes is the Big O Cheatsheet.
If you want to show all the currently open ports on linux, just use the following command:
netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
udp 0 0 0.0.0.0:39790 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:41121 0.0.0.0:*
udp6 0 0 :::57063 :::*
udp6 0 0 :::42147 :::*
I was looking for ways to visualize the progress of a project and also I wanted to do this with on-board tools. After a quick search I found the following command.
git log --graph --decorate --oneline
~/.giconfig
helps:
[alias]
lg = !"git lg1"
lg1 = !"git lg1-specific --all"
lg2 = !"git lg2-specific --all"
lg3 = !"git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%
~/.bashrc
. This saves 2/3 of the letters.
alias g='git'
If you have multiple CSV files with the same format and you want to combine them to just a single file, just do
cat file1.csv file2.csv > output.csv
cat *.csv > output.csv
To count lines of one or many files on the shell I use wc
(Wordcount). If you want to count all lines of all CSV files in a dictionary, just type:
wc -l *.csv