| Command |
Description |
Examples |
| find |
The
find utility recursively descends the directory hierarchy for each
path seeking files that match a Boolean expression. |
-o
$ find /home/user2 -name 'dir*'
/home/user2/dir2
/home/user2/dir3
|
| grep |
Searches
a file for a pattern. |
-i
$ grep banana ./*
/home/user2/fruit: banana
/home/user2/fruit.tar:banana
/home/user2/fruit2: banana
/home/user2/fruit2.tar:banana
|
| id |
Returns
the user identity. |
-a
$ id
uid=1002(user2) gid=10(staff)
$ id -a
uid=1002(user2) gid=10(staff) groups=10(staff) |
| sort |
The sort
command sorts lines of all the named files together and writes the
result on the standard output. |
$ sort
file1
$ sort +1n file2
|
| su |
Allows
a user to become super user or another user |
-
username
$ su -student6
Password:
$ |
| who |
Lists
who is on the system. |
0H,-q
$ who
user2 console Apr 30 12:37 (:0)
user2 pts/4 Apr 30 12:40 (:0.0)
$
|
| who
am i |
Displays the
effective current username. |
$ who am i
user2 pts/4 Apr 30
12:40 (:0.0) |
| whoami |
Displays
the effective current username |
$ whoami
user2 |