/[cvs]/nfo/bash/alias.sh
ViewVC logotype

Contents of /nfo/bash/alias.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Sat Nov 6 21:22:28 2004 UTC (19 years, 6 months ago) by rabit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +33 -1 lines
File MIME type: application/x-sh
+ Aliasses: asciitable, lsfunc, psc, syncdate, timestamp, fire.

1 #!/bin/sh
2 #---------------------------------------------------------------------
3 #- alias.sh - Useful shell aliasses
4 #- rabit@netfrag.org, 11.10.2004 - 11.10.2004
5 #- $Id: alias.sh,v 1.3 2004/10/12 14:14:27 rabit Exp $
6 #---------------------------------------------------------------------
7
8 alias asciitable="for n in \`seq 040 176 | grep -E '^[^89]*$'\`; do m='00'\$n; o=\${m:\$((\${#n}-1)):3}; echo -en \"\$o:'\\\\\$o' \"; done; echo"
9
10 # CPU information (very useful!):
11 alias cpuinfo='cat /proc/cpuinfo'
12
13 alias l='ls -aFhls --color'
14
15 # List devices:
16 alias lsdev='cat /proc/devices'
17
18 # List dma:
19 alias lsdma='cat /proc/dma'
20
21 # List declared functions:
22 alias lsfunc="declare -f | grep -E '.[ ]\(\)'"
23
24 # List interrupts:
25 alias lsint='cat /proc/interrupts'
26
27 # List IO memory and ports:
28 alias lsio='echo - IO Memory:; cat /proc/iomem; echo; echo - IO Ports:; cat /proc/ioports | more'
29
30 # List modules (does exactly the same as /bin/lsmod):
31 alias lsm='cat /proc/modules'
32
33 # List all dirs in $PATH:
34 alias lspath="ls -CF --color \`echo \$PATH | cut -d ':' --output-delimiter ' ' -f 1,-\` | more"
35
36 # List PCI enumerator devices:
37 alias lspci='cat /proc/pci'
38
39 # List used swap:
40 alias lsswap='cat /proc/swaps'
41
42 alias md='mkdir'
43
44 # Memory information (very useful!):
45 alias meminfo='cat /proc/meminfo'
46
47 alias n='nano'
48
49 # View processes without line wrapping (scrolling with cursor keys):
50 alias pl='ps afux | less -S'
51
52 # Count of (running) processes:
53 alias psc="p1=\`ps -A | wc -l\`; p2=\`ps auxr | wc -l\`; echo $HOSTNAME: \$[p1 - 2] processes, \$[p2 - 2] running."
54
55 # A (slightly looong) one-liner, as mighty as Tux: :)
56 # (change the NTP server to your needs, see 'http://www.ntp.org/')
57 alias syncdate="echo -n 'NTP: '; date -s\"\`cat </dev/tcp/de.pool.ntp.org/13\`\"; echo -n 'Local: '; date; echo 'Date and time in sync.'"
58
59 # Timestamp (good when backupping, result like '200401013_123152'):
60 alias timestamp="date +'%Y%m%d_%H%M%S'"
61
62 # Console fire with low priority
63 alias fire="nice -n 19 aafire -dim -bold -reverse -normal -boldfont"
64

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed