[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] Skip to the content of the web site.

Miscellaneous Commands

Contents Previous Topic Next Topic

The following are some miscellaneous commands which may be of interest:

cal

The cal command prints a calendar. By default, it prints the current month, though it can print either all the months in a given year, or a particular month (January = 1, ..., December = 12) in a given year. For example:

{ecelinux:1} cal
   August 2006
 S  M Tu  W Th  F  S
       1  2  3  4  5
 6  7  8  9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

{ecelinux:2} cal 2000
                                2000

         Jan                    Feb                    Mar
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
                   1          1  2  3  4  5             1  2  3  4
 2  3  4  5  6  7  8    6  7  8  9 10 11 12    5  6  7  8  9 10 11
 9 10 11 12 13 14 15   13 14 15 16 17 18 19   12 13 14 15 16 17 18
16 17 18 19 20 21 22   20 21 22 23 24 25 26   19 20 21 22 23 24 25
23 24 25 26 27 28 29   27 28 29               26 27 28 29 30 31
30 31
         Apr                    May                    Jun
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
                   1       1  2  3  4  5  6                1  2  3
 2  3  4  5  6  7  8    7  8  9 10 11 12 13    4  5  6  7  8  9 10
 9 10 11 12 13 14 15   14 15 16 17 18 19 20   11 12 13 14 15 16 17
16 17 18 19 20 21 22   21 22 23 24 25 26 27   18 19 20 21 22 23 24
23 24 25 26 27 28 29   28 29 30 31            25 26 27 28 29 30
30
         Jul                    Aug                    Sep
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
                   1          1  2  3  4  5                   1  2
 2  3  4  5  6  7  8    6  7  8  9 10 11 12    3  4  5  6  7  8  9
 9 10 11 12 13 14 15   13 14 15 16 17 18 19   10 11 12 13 14 15 16
16 17 18 19 20 21 22   20 21 22 23 24 25 26   17 18 19 20 21 22 23
23 24 25 26 27 28 29   27 28 29 30 31         24 25 26 27 28 29 30
30 31
         Oct                    Nov                    Dec
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
 1  2  3  4  5  6  7             1  2  3  4                   1  2
 8  9 10 11 12 13 14    5  6  7  8  9 10 11    3  4  5  6  7  8  9
15 16 17 18 19 20 21   12 13 14 15 16 17 18   10 11 12 13 14 15 16
22 23 24 25 26 27 28   19 20 21 22 23 24 25   17 18 19 20 21 22 23
29 30 31               26 27 28 29 30         24 25 26 27 28 29 30
                                              31

{ecelinux:3} cal 1 2000
   January 2000
 S  M Tu  W Th  F  S
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
{ecelinux:4} 

clear

The clear command clears the current screen on the terminal.

dc

The command dc starts a reverse-Polish stack-based calculator. Each number is pushed onto the stack, an operator takes the last two numbers on the stack, performs that operation on them, and puts the result onto the stack, and p prints the top of the stack and q quits the program.

{ecelinux:1} dc
3 4 + p
7
2 * p
14
q
{ecelinux:2}

fortune

The fortune command randomly picks a line from a specific file of quotes and sayings. Unfortunately, ecelinux does not have fortune installed, however, if it were, you could use:

{ecelinux:1} fortune
Line Printer paper is strongest at the perforations.
{ecelinux:2} fortune
Anyone can hold the helm when the sea is calm.
-- Publius Syrus
{ecelinux:3}

You can always visit http://www.reichel.net/potpourri/cookie.html.

talk

The talk userid makes a request for a talk session with the person with the specified user id. If that person is logged on and responds appropriately, a talk session is entered where the screen is split in half, and what you write appears in the top half, and what the other person writes appears in the lower half.

{ecelinux:1} talk dwharder

User dwharder will see:

Message from Talk_Daemon@ecelinux at 22:38 ...  
talk: connection requested by ece250@ecelinux.  
talk: respond with:  talk ece250@ecelinux       

Quit your talk session with Ctrl-C.

top

The top command lists the most CPU-intensive programs currently running. As the example shows, ecelinux is not used much between Academic Terms:

{ecelinux:1} top
load averages:  0.16,  0.17,  0.18                                  22:45:49
80 processes:  79 sleeping, 1 on cpu
CPU states: 92.6% idle,  0.5% user,  2.8% kernel,  4.1% iowait,  0.0% swap
Memory: 4096M real, 3054M free, 89M swap in use, 6877M swap free

   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
  6097 root       1  58    0 3192K 1584K sleep    0:00  0.05% rsync
  6061 ece250     1  58    0 2856K 1696K cpu/5    0:00  0.04% top
  6088 root       1   0    0 2536K 1904K sleep    0:00  0.03% tcsh
  1870 root       1  58    0 3480K 1240K sleep  128:46  0.02% top
  2660 ece250     1  58    0 7784K 2544K sleep    0:01  0.02% sshd
  9376 gnadaraj   1  58    0 8064K 2680K sleep    0:06  0.01% sshd
  6087 root       1  48    0 2904K 1264K sleep    0:00  0.01% rshd
  4401 ctschung   1  58    0 8024K 2656K sleep    0:00  0.01% sshd
   393 root      12  52    0 3200K 1632K sleep    8:43  0.01% mibiisa
   259 root      11  24    0   16M   15M sleep    7:14  0.00% nscd
  2662 ece250     1  48    0 2832K 2288K sleep    0:00  0.00% tcsh
  4431 ctschung   1  58    0 3464K 1848K sleep    0:00  0.00% sftp-server
   243 root      22  58    0 5544K 2432K sleep    7:28  0.00% syslogd
   141 root       1  58    0 3808K 1168K sleep    7:08  0.00% sshd
   132 root       1  58    0 1792K  504K sleep    5:47  0.00% prngd

units

The units command runs a program which gives you various conversions between units. Follow the prompts and use Ctrl-C to quit.

{ecelinux:1} units
you have: furlong/fortnight
you want: cm/min
        * 9.978571e-01
        / 1.002147e+00
you have: cm
you want: ft
        * 3.280840e-02
        / 3.048000e+01
you have: ^C
{ecelinux:2} 

uptime

The uptime command indicates how long the current machine has been running.

{ecelinux:1} uptime
 10:44pm  up 20 days 11:14,  10 users,  load average: 0.16, 0.18, 0.18
{ecelinux:2} 
Contents Previous Topic Next Topic

Copyright ©2005-2008 by Douglas Wilhelm Harder. All rights reserved.

[an error occurred while processing this directive]