## rm

#### OS/161 Reference Manual

### Name

rm - remove (unlink) files

### Synopsis

`/bin/rm` file...

### Description

`rm` deletes the files specified on its command line. (If one of the filenames specified is one of several hard links to the same file, the file is only removed erased when all links to it are deleted.)

Using `rm` on directories produces an error. Use rmdir to remove directories.

### Requirements

`rm` uses the following system calls:

- remove
- write
- _exit

As the remove system call is generally not part of the basic system calls assignment, `rm` will usually still not function after the basic system calls assignment is complete. This call is typically part of a later assignment, usually the file system assignment. Consult your course materials for specific information.

### Restrictions

emufs does not support `rm`. (This is intentional.)

### See Also

rmdir