Programmer's Wiki
Advertisement

Bash[]

rm filename

or using interactive mode to avoid mistakes.

rm -i filename

Java[]

File file = new File("somepath");

file.delete();

Perl[]

Python[]

import os
os.remove("somepath")

See Also[]


16px-Pencil
Advertisement