Addendum to the Quick Reference Guide

Linux

Contents


  1. Aliases
  2. New commands

Aliases

cpd

cpd source(for zsh only)
#
# cpd Change to a Previous Directory (contained in the directory stack)
#
# Author W.Friebel friebel@ifh.de 13/04/95
#
# Usage: cpd
#        displays the directories in the buffer stack
#	 chose the directory you want to cd to with the cursor keys
#	 optionally edit the directory string
#	 select the directory by pressing Enter (or ^X^W)
#	 or leave the menu with ^C
#
# it is recommended to bind cpd to a function key
# the dirs or pushd function can be used in addition to preload frequently
# used directories into the directory stack

ll

function definition in /etc/zshrc
ll () {
        ls -la ${*}
}
alias definition in /etc/tcshrc
alias ll        'ls -lA'

lsize

function definition in /etc/zshrc
lsize () {
        ls -l ${*} | sort -nr +4 | head -20
}
alias definition in /etc/tcshrc
alias lsize     'ls -l \!* | sort -nr +4 | head -20'

lt

function definition in /etc/zshrc
lt () {
        ls -lt ${*} | head -20
}
alias definition in /etc/tcshrc
alias lt     'ls -lt \!* | head -20'

pp

function definition in /etc/zshrc
pp () {
        ps -ef | egrep " PID|${*}" | grep -v grep
}
alias definition in /etc/tcshrc
alias pp        'ps -ef | egrep '\'' PID|\!*'\'' | grep -v grep'

ff

function definition in /etc/zshrc
ff () {
        find . -name "${*}" -print
}
alias definition in /etc/tcshrc
alias ff      "find . -name \!^ -print"

dot command (.) in tcsh

alias definition in /etc/tcshrc
alias .         source

rs

alias definition in /etc/zshrc
alias 'rs=eval `resize -u`'
alias definition in /etc/tcshrc
alias rs        'eval `resize -c`'

setenv

function definition in /etc/zshrc
setenv () {
        eval ${1}=${2}
        export $1
}

New commands

tklife

tklife source
Check the AFS token expiration. Output a message and give a nonzero return code if the token is not existing, is expired or will expire soon (default 1 hour).
Usage: tklife [-l <warning time in hh[:mm:ss]>]

Requirements:

yplist

yplist source
List contents of netgroups (in NIS map netgroup) or the structure of the NIS map netgroup.
usage: yplist [-h] [-t] [-d domain] [-f file] [-s] [netgroup]
       yplist -d domain ...     use domain instead of default domain
       yplist -f file ...       exclude entries found in file from listing
       yplist -h                displays this help information
       yplist netgroup          lists entries in netgroup
       yplist -s                lists the whole netgroups structure
       yplist -s netgroup       lists the structure of netgroup 
       yplist -t                lists top netgroups
return codes:   1               program called with wrong option[s]
                2               domain or netgroup given in arglist not existing
                3               subordinate netgroup not existing
Requirements:

for Version 1.15 Sep 22, 2004