-
Notifications
You must be signed in to change notification settings - Fork 0
bash_aliases
Your Name edited this page Jan 8, 2020
·
1 revision
- | Defaults |
- reload the shell (i.e. invoke as a login shell)
*alias load='source ~/.bashrc && source ~/.dot/.bash_aliases && source ~/.dot/.bash_functions.sh'
- Enable simple aliases to be sudo'ed. ("sudone"?)
- create a dir with date from today
- fallback by typo
- Print each PATH entry on a separate line
- super-grep ;)
*alias aptChangelog="xargs -I% -- zless /usr/share/doc/%/changelog.Debian.gz <<<"
- | git |
- git config --global alias.lg "log --color --graph --pretty=format:'%C(>*dc322f)%h%C(>*b58900)%d %C(>*eee8d5)%s %C(>*dc322f)| %C(>*586f75)%cr %C(>*dc322f)| %C(>*586e75)%an%Creset' --abbrev-commit"
- | Network |
- external ip address
- Do not wait interval 1 second, go fast >*
- Gzip-enabled
curl
- displays the ports that use the applications
- shows more about the ports on which the applications use
- show only active network listeners
*also pass it via sudo so whoever is admin can reload it without calling yo
*alias interfaces_IP3="ifconfig | awk -v RS="\n\n" '{ for (i=1; i<=NF; i++) if (
$i == "inet" && $ (i+1) ~ /^addr:/) address = substr($(i+1), 6); if (address != "127.0.0.1") printf "%s\t%s\n", $1, address }'"
- date
- stopwatch
- pass options to free
- get top process eating memory
- get top process eating cpu
- shows the corresponding process to ...
- older system use /proc/cpuinfo >>
> get GPU ram on desktop / laptop>>
*kill all process with name
- shows the process structure to clearly
- shows all your processes
- the load-avg
- show all partitions
- shows the disk usage of a directory legibly
- show the biggest files in a folder first
- shows the complete disk usage to legibly
- becoming root + executing last command
- decimal to hexadecimal value
- urldecode - url http network decode
- ROT13-encode text. Works for decoding, too! ;)
- intuitive map function
- For example, to list all directories that contain a certain file:
- find . -name .gitattributes | map dirname
>>> Validators
>>> Characters
>>> Regular Expressions
- displays a directory tree
- displays a directory tree - paginated
alias nyancat="telnet miku.acm.uiuc.edu" > offline
- if cron fails or if you want backup on demand just run these commands >*
- again pass it via sudo so whoever is in admin group can start the job >*
- Backup scripts >*
> Memcached server status >>
> quickly flush out memcached server >>
- list all images
- list running containers (image instances)
- kill all running container processes:
- remove all containers
- remove all docker images
- list all volumes
- list all orphaned volumes
- remove all docker volumes
- remove all orphaned docker volumes
- docker compose (assumes current directory contains the docker-compose.yml)
- start socker stack defined by docker-compose.yml
- stop docker stack defined by docker-compose.yml
- rebuild docker stack
- watch logs in docker stack