Fandom

Programmer's Wiki

Deleting a file

406pages on
this wiki
Add New Page
Talk0 Share

Bash Edit

rm filename

or using interactive mode to avoid mistakes.

rm -i filename

Java Edit

File file = new File("somepath");

file.delete();

Perl Edit

Python Edit

import os
os.remove("somepath")

See Also Edit


16px-Pencil

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.