Linux 3
Linux 3
Unit 3
Using the System
KDE:
Red Hat, Fedora:
GNOME:
SUSE:
$ ls
$ ls -l
$ ls /dev
$ ls -l /dev
WRONG RIGHT
1. Separation
$ mail - f personal $ mail -f personal
$ who-u $ who -u
2. Order
$ mail test root -s $ mail -s test root
$ -u who $ who -u
3. Multiple options
$ who -m-u $ who -m -u
$ who -m u $ who -mu
$ passwd
Changing password for tux1
Old password:
New password:
Retype new password:
$ date
Mon Jan 1 23:59:59 UTC 2007
$ cal 1 2007
January 2007
Su Mo Tu We Th Fr Sa
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
$
$ who
root tty1 Jan 1 11:10
tux1 tty2 Jan 1 11:04
$ who am i
host!tux1 tty2 Jan 1 11:04
But:
$ whoami
tux1
$ finger
Login Name Tty Idle Login Time
tux1 Tux (1) 2 Jan 1 11:04
root root *1 7 Jan 1 11:10
$ finger tux1
Login: tux1 Name: Tux (1)
Directory: /home/tux1 Shell: /bin/bash
On since Mon Jan 1 11:04 (UTC) on tty2
No mail.
No plan.
Tux1 Tux2
© Copyright IBM Corporation 2006
The mesg Command
The mesg command controls whether other users can send
messages to you with the write, wall or talk command or through
output redirection.
$ mesg n
$ history 5
99 clear
999 wc .bash_profile
1000 wc .bash_profile
1001 wc .bash_profile
1000 history
$ wc .bash_profile
16 23 238 .bash_profile
Redo previous:
$ !-1
wc .bash_profile
16 23 238 .bash_profile
or:
$ !!
GNOME: KDE: