Skip to content

Latest commit

 

History

History
353 lines (288 loc) · 24.3 KB

FUNCTION_DESCRIPTIONS.md

File metadata and controls

353 lines (288 loc) · 24.3 KB

Commands

Less

Name Runs Description
le, less1 less --RAW-CONT... Display text or file in pager.
m ___printOrDispl... Print or display text or file in pager.

Ls

Name Runs Description
l ___displayOutpu... List or display directory contents in pager using short listing format.
ll ___displayOutpu... List or display directory contents in pager using long listing format.
la __listOrDisplay... List or display all directory contents in pager using short listing format.
lla __listOrDisplay... List or display all directory contents in pager using long listing format.
lt __listOrDisplay... List or display directory contents in pager ordered by date using short listing format.
llt __listOrDisplay... List or display directory contents in pager ordered by date using long listing format.
dl __listOrDisplay... List or display matching directories in pager using short listing format.
dll __listOrDisplay... List or display matching directories in pager using long listing format.
l1 __listOrDisplay... List or display in pager one directory item per line using short listing format.
la1 __listOrDisplay... List or display in pager one directory item per line including hidden files using short listing format.
first ls "$@" | head ... List first file in directory.
nf, newest ls -pt "$@" | g... Print name of newest file in directory.
rf, randomFile ls -pt | grep -... Print name of random file in directory.
findd, directories find . -name .g... Print all subdirectories.
extensions find . -type f ... Print all file extensions.

Tree

Name Runs Description
t, tree1 tree -C -I .git... Print directory structure.
tt clear... Clear screen andprint directory structure.

Cd

Name Runs Description
.., cd.. ___goUpNumberOf... Go up one directory.
... ___goUpNumberOf... Go up two directories.
.... ___goUpNumberOf... Go up three directories.
..... ___goUpNumberOf... Go up four directories.
...... ___goUpNumberOf... Go up five directories.
....... ___goUpNumberOf... Go up six directories.
cdiso sudo mkdir /med... Mount iso and cd into.

Files

Name Runs Description
cp cp --interactiv... Copy files safely.
mv mv --interactiv... Move files safely.
rm rm --interactiv... Delete files safely.
cpdir cp --interactiv... Copy directories safely.
mvdir mv --interactiv... Move directories safely.
rmdir rm --interactiv... Delete directories safely.
mk, md, mkdir1 mkdir --parents... Create directory and descend into.
bk, backup sudo cp --prese... Backup file.
switch tempFile=$(mkte... Switch contents of files.

Pwd

Name Runs Description
p if [[ $# -eq 0 ... Print working directory or path to file.

Echo

Name Runs Description
e echo "$@" Print text.
ee echo -e "$@" Print text interpreting backslashed characters.
en echo -n "$@" Print text without trailing newline.

Run In Background

Name Runs Description
rb, runInBackground nohup "$@" &>/d... Run command in background.

Basics

Name Runs Description
ef, editFunctions "$EDITOR" ~/.st... Edit standard aliases.
er, editUsersRc "$EDITOR" ~/.st... Edit users standard rc.
er1, editProjectsRc projectLocation... Edit projects standard rc.
ba bash "$@" Start new bash shell.
ty, type1 # Checks if com... Print command type or definition.
c cat "$@" Print file contents.
? echo $? Print exit code of last command.
cl, clr clear Clear the screen.
re reset "$@" Reset the screen.
q exit Exit bash shell.
o, openFile __runCommandInB... Open file with default app.
te, terminal x-terminal-emul... Open new terminal with same working directory.
to touch "$@" Update files timestamp or create new one.
da date "$@" Print date and time.
ma, make1 make "$@" 2>&1... Run make with pager.
na, explorer __runCommandInB... Start file explorer in background in working directory.
diff1 colordiff "$@"... Compare files line by line in color.
me, makeExecutable if [[ ! -f "$1"... Make file executable or create new bash or python script.

History

Name Runs Description
h, history1 if [ "$#" -eq 0... Search command history for pattern.

Text Editors

Name Runs Description
v vim -p "$@" Edit file with vim.
vv view -p "$@" View file in vim.
n, nano1 nano --undo --a... Edit file with nano.
nv nano --view --u... View file in nano.
g, gedit1 __runCommandInB... Edit file with gedit.
sub __runCommandInB... Edit file with sublime text.

Sudo

Name Runs Description
s sudo "$@" Execute command as super user.
f, please sudo $(history ... Execute last command as super user.
sudoCp sudo cp --inter... Copy files safely as super user.
smv sudo mv --inter... Move files safely as super user.
srm sudo rm --inter... Delete files safely as super user.
scpdir sudo cp --inter... Copy directories safely as super user.
smvdir sudo mv --inter... Move directories safely as super user.
srmdir sudo rm --inter... Delete directories safely as super user.
sm, sle sudo less --RAW... Display text or file in pager as super user.
sv, se sudoedit "$@" Edit file with vim as super user.
svv sudo view -p "$... View file in vim as super user.
sn sudo nano --und... Edit file with nano as super user.
sg sudo gedit "$@... Edit file with gedit as super user.

Procesess

Name Runs Description
taskManager, ht htop "$@" Run terminal task manager.
ps1 ps "$@" | __pr... Print users processes.
psa, pse, processes ps -e "$@" | _... Print all processes.
pgrep1 pgrep --list-na... Find processes with part of name.
kill1 kill -9 "$@" Kill process with kill signal.
st, strace1, trace strace -s\ 2000... Trace system calls.

Text

Name Runs Description
he head "$@" Print first ten lines.
he1, firstLine head -n1 "$@" Print first line.
ta tail "$@" Print last ten lines.
ta1, lastLine tail -n1 "$@" Print last line.
wcl, countLines wc -l "$@" Count lines.
wcw, countWords wc -w "$@" Count words.
trd tr --delete "$@... Delete characters.
loc, linesOfCode rootDir="$PWD"... Count lines in files with extension in working and subdirectories.

Tables

Name Runs Description
table column -t -s "$... Line up columns.
cut1, keepColumns cut --delimiter... Keep columns.
sort1 sort --field-se... Sort lines by column.

Search

Name Runs Description
grep1 grep --color=au... Print lines containing pattern.
gr __printLinesCon... Print or display with pager lines containing pattern.
grr __printLinesCon... Print or display with pager numbered lines containing pattern in working and subdirectories.
lo, locate1 locate "$1" </code>... Locate files on filesystem containing pattern in their names.
find1 find . -not -iw... Locate files containing pattern in their names in working and sub directories.

Archives

Name Runs Description
extract if [ -z "$1" ];... Extract archive of any type.

Terminal Multiplexer

Name Runs Description
tm, mu tmux "$@" Run terminal multiplexer.
tma, mua tmux attach "$@... Run terminal multiplexer and attach to last session.
tml, mul tmux ls List terminal multiplexers sessions.

System Information

Name Runs Description
df1 df -h | grep "s... Print available disk space in simplified form.
du1 du --summarize ... Print disk space occupied by file or folder.
fr, free1 echo "all: "$(... Print all and free memory space in megabytes.
temp, temperature acpi -t Print temperature of cpu.
batt, battery acpi Print battery status.
uname1, kernelVersion uname --all Print operating system information.
pci, lspci1 lspci -v "$@" |... Print info about pci devices.

Power

Name Runs Description
reboot sudo reboot Restart computer.
poweroff sudo poweroff Shut down computer.
hib sudo pm-hiberna... Hibernate computer.
sus sudo pm-suspend... Suspend computer.

Keyboard

Name Runs Description
uskeys setxkbmap -layo... Switch to american keyboard layout.
keycode xev "$@" Monitor keycodes of pressed keys.
norepeat xset -r Turn off key repeat.
repeat xset r Turn on key repeat.

Misc

Name Runs Description
blue echo -en "\e]PC... Change hue of color blue in linux terminal.
path echo -e ${PATH/... List directories contained in path variable.
bc1 gcalccmd "$@" Run terminal calculator that supports decimal numbers.
hd1 hd "$@" | __pr... Print hexadecimal representation of file or stream.
profile source /etc/pro... Run profile script.
vimode set -o vi Change bash line editing to vi mode.
emacsmode set -o emacs Change bash line editing to emacs mode.
ssd sudo fstrim -v ... Trim ssd.
typingTutor gtypist "$@" Start typing tutor.
extension curl --silent f... Describe file extension.

Package Management

Name Runs Description
ch, canhaz if [[ "$__stand... Install package.
update sudo apt-get up... Update information about available packages.
upgrade sudo apt-get up... Upgrade all packages.
dist-upgrade sudo apt-get di... Upgrade all packages intelligently.
remove sudo apt-get re... Remove package and all unneeded packages.
purge sudo apt-get pu... Remove package and all unneeded packages together with configuration files.
autoremove sudo apt-get au... Remove unneeded packages.
installed, packages cat /var/log/ap... Print packages that were installed by user.
allInstalled, allPackages dpkg --get-sele... Print all installed packages.
depends apt-cache show ... Print package dependencies.

Package Information

Name Runs Description
pd, describe apt-cache show ... Print package description.
ve, version # Check if pass... Print installed and available version of package or command.
package call1=$(sudo wh... Print package of installed command together with description and location.

Package Search

Name Runs Description
findPackage apt-cache searc... Find available packages with part of name or description.
ap, apropos1, findCommand apropos "$@" </code>... Find installed commands with part of name or description.
apt-file1 apt-file -x sea... Find available packages that provide command.
wi, whatis1 # Checks if it ... Describe package or command or find available packages with part of name or command.

Git

Name Runs Description
commit git commit -am ... Commit changed and deleted files with message.
commitm git commit -a "... Commit changed and deleted files and edit message in editor.
init git init "$@" Initialize repository.
push git push "$@" Push changes to remote repository.
pull git pull "$@" Pull changes from remote repository.
merge git merge "$@" Merge specified branch with current one.
gc, checkout git checkout "$... Checkout branch or file.
gb, branch git branch "$@"... List branches or create new one.
gs git -c color.st... Print short repository status.
gl git log --graph... Display minimal log of commits.
gll git log --graph... Display medium log of commits.
glll git log --decor... Display log of commits.
gu git remote upda... Update information about remote repository and print status.
gd git diff "$@" Display changes between commits.
ga git add "$@" Add files to repository.
gm git mv "$@" Move repositories files.
gls, lsgit git ls-files "$... List files that are in repository.

Github

Name Runs Description
clone git clone git@g... Clone github project.
origin git remote add ... Set github project as remote repository.
cloneAll if [[ -z "$1" ]... Clone all users github projects.

Network

Name Runs Description
ip1 /sbin/ifconfig ... Print internal ip.
ip2 lynx --dump htt... Print external ip.
gateway route -n </code>... Print gateways ip.
mac ifconfig | grep... Print mac addresses of network devices.
pa, pingAll ping -c 1 -q $(... Ping gateway and google.
nmap1 if [[ $# -eq 0 ... Scan local network.
ne, network localIp=$(ip1)... Print ssh port status of local devices and ping google.

Wireless

Name Runs Description
woff sudo rfkill blo... Block wireless device.
won sudo rfkill unb... Unblock wireless device.
wr woff... Reset wireless device.
up sudo ifconfig w... Activate wireless interface.
down sudo ifconfig w... Deactivate wireless interface.
wlan sudo iwlist wla... Print wireless networks in range.

Internet

Name Runs Description
i, www, internet __runCommandInB... Start default browser in background.
fire __runCommandInB... Start firefox in background.
chrome __runCommandInB... Start chrome in background.
lynx1 lynx -accept_al... Start terminal web browser.

Audio

Name Runs Description
mixer alsamixer "$@" Start terminal volume control.
a ___setVolumeTo ... Increase volume by six decibels.
z ___setVolumeTo ... Decrease volume by six decibels.
aa ___setVolumeTo ... Increase volume by two decibels.
zz ___setVolumeTo ... Decrease volume by two decibels.

Framework

Name Runs Description
fu "${EDITOR:-nano... Edit standard functions.
rc, al "${EDITOR:-nano... Edit standard rc.