Contents
Exercise: Unix Tools
-
Installation:
-
How many packages are installed on you machine
(the command wc helps counting)?
-
How much disk space is left/used on your machine?
-
What directory under your home directory is using
most disk space?
-
Terminal Tools:
-
Make a copy of one of the files in you home directory
and try diff on the original and that copy.
-
Add you name as an alias and invent some functionality for it.
-
Search for you name in all files in you home directory and in
all sub-directories.
-
Cron:
Use cron to:
-
Write the current date and time
in a file called "data" in you
home directory and update it every minute.
-
Write an email-message to yourself
every minute that keeps you informed about
the current local time in
La Habana (Havana, Capital of Cuba).
-
Regular Expressions:
-
Create a test text-file with one line containing you name
and some other lines with names that are similar.
-
Write a regular expressions that matches your name
(so that the output of the grep command applied
to the test fils is only your name).
-
Write a regular expressions that matches about half of the names
in the file.
-
Can you write a regular expressions that matches
everything but your name? Why not ? What does the
term "regular" mean?
-
Math Tools:
-
Try bc, octave, maple, matlab and mathematica
(if installed) on the question:
"What is 7777 divided by 17 ?"
-
Compression and Archiving:
-
Make a directory tmp under you home directory and copy
all files from you home directory that begin with a "." to tmp.
-
Create an archive of the tmp directory, then gzip the archive.
-
Now create a test directory and un-zip and un-tar
the archive in that directory.
-
X:
-
Draw a picture, save it as gif and jpeg and look at it with xv.
-
Convert the picture into postscript (ps) and look at it with
ghostview (gv).
-
Compare the sizes of the three picture files in the different formats.
-
Open the application xcalc on the monitor of you neighbor
(you might have to ask him for collaboration to get the access rights).