From 11f978c6672e96fead7ab130775384636b713c38 Mon Sep 17 00:00:00 2001 From: Alban VIDAL Date: Thu, 31 May 2018 12:26:14 +0200 Subject: [PATCH] Added some aliases and functions for systemd / journald Signed-off-by: Alban VIDAL --- README.md | 15 +++++++++++++-- root/.bashrc | 13 ++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa9f343..af21e81 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,18 @@ cd /srv/git/basic_config_debian ## New aliases and functions available +### Hard drive + `hddtop`: print hard drive usage -+ `ipa`, `ip4a`, `ip6a` and `ip4all`: print interfaces list + +### Memory + `memtop`: print top usage memory -+ `jf`: aliases for `journalctl -f` + +### Network ++ `ipa`, `ip4a`, `ip6a` and `ip4all`: print interfaces list + +### Systemd / Journald ++ `jf`: alias for `journalctl -f` ++ `jfu `: function for `journalctl -f -u -u ...` ++ `scf`: alias for `systemctl list-units --failed` ++ `scs `: function for `systemctl status ` ++ `scc `: function for `systemctl cat ` diff --git a/root/.bashrc b/root/.bashrc index 6a6aff6..59247ad 100644 --- a/root/.bashrc +++ b/root/.bashrc @@ -21,8 +21,19 @@ alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' -# Journalctl : +# Alias / fonctions for journald alias jf="journalctl -f" +function jfu(){ + for UNIT in $@; do + UNITS+=" -u $UNIT" + done + journalctl -f $UNITS; +} + +# Alias / fonctions for systemd +alias scf="systemctl list-units --failed" +function scs(){ systemctl status $@; } +function scc(){ systemctl cat $@; } # Git : alias ggb="cd /srv/git/basic_config_debian"