Home / Linux / Histogram of all commands in my /usr/bin by length (total 5006) : linux

Histogram of all commands in my /usr/bin by length (total 5006) : linux

Histogram of all commands in my /usr/bin by length (complete 5006) : linux

Here’s a really ugly, unnecessarily one-line command if anybody else desires to do that (if in case you have python pandas and matplotlib):

ls -1 /bin/ | awk ' print length ' | kind -n | uniq -c | sed 's/^s*//g; s/ /,/g' | python -c 'import pandas as pd; from matplotlib import pyplot as plt; df=pd.read_csv("/dev/stdin"); fig, ax = plt.subplots(); ax.bar(df.iloc[:,1],df.iloc[:,0]); ax.set_xlabel("n_chars"); ax.set_ylabel("Frequency"); plt.present()'

Some highlights:

Most widespread command length: 7 (704 commands), carefully adopted by eight (702 commands)

Single-character commands: [, w, X

Longest command: dbus-update-activation-environment

About Agent

Check Also

SpaceX Successfully Launches 60 More Starlink Satellites as it Continues Towards 2020 Service Debut

SpaceX Successfully Launches 60 More Starlink Satellites as it Continues Towards 2020 Service Debut SpaceX …

Leave a Reply

Your email address will not be published. Required fields are marked *