Remove files and folders in Linux

Problem

Removing a file or folder in linux.

tl;dr

rm filename
rm foldername -r

Solution

This will work with almost any linux flavour.

rm filename

This will remove a file.

 rm foldername ­r 

This will remove an entire folder. ­r is to tell it to remove files recursively.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 3247