Added some aliases and functions for systemd / journald
Signed-off-by: Alban VIDAL <alban.vidal@zordhak.fr>
This commit is contained in:
parent
1a2e046117
commit
11f978c667
15
README.md
15
README.md
@ -29,7 +29,18 @@ cd /srv/git/basic_config_debian
|
|||||||
|
|
||||||
## New aliases and functions available
|
## New aliases and functions available
|
||||||
|
|
||||||
|
### Hard drive
|
||||||
+ `hddtop`: print hard drive usage
|
+ `hddtop`: print hard drive usage
|
||||||
+ `ipa`, `ip4a`, `ip6a` and `ip4all`: print interfaces list
|
|
||||||
|
### Memory
|
||||||
+ `memtop`: print top usage 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 <units>`: function for `journalctl -f -u <unit> -u <unit>...`
|
||||||
|
+ `scf`: alias for `systemctl list-units --failed`
|
||||||
|
+ `scs <units>`: function for `systemctl status <units>`
|
||||||
|
+ `scc <units>`: function for `systemctl cat <units>`
|
||||||
|
13
root/.bashrc
13
root/.bashrc
@ -21,8 +21,19 @@ alias grep='grep --color=auto'
|
|||||||
alias fgrep='fgrep --color=auto'
|
alias fgrep='fgrep --color=auto'
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep='egrep --color=auto'
|
||||||
|
|
||||||
# Journalctl :
|
# Alias / fonctions for journald
|
||||||
alias jf="journalctl -f"
|
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 :
|
# Git :
|
||||||
alias ggb="cd /srv/git/basic_config_debian"
|
alias ggb="cd /srv/git/basic_config_debian"
|
||||||
|
Loading…
Reference in New Issue
Block a user