NEXT UP previous
Next: Answers

Exercises

  1. Write a simplified version of the ls command which just takes the name of a single directory as its only command line parameter and lists the names of all the files in the directory, one name per line. It will be simpler if you do not try to sort the list of names.

  2. Write a program which gets a copy of the struct termios associated with your terminal and displays in a sensible human readable form the values of the settings it finds.

  3. Write a C program which prompts a user for a name and password and takes string values from the user in response to the prompts. Make sure that you suppress character echo while the password is being entered, and restore the echo afterwards, before your program prints the values it obtains and then terminates.

  4. Write a simple rename command which will allow you to rename any file owned by you in the current directory. The format of the command should be:

    	$ rename <oldname> <newname>
    

NEXT UP previous
Next: Answers