New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice: Teach rmdir instead of rm -r to novices #838

jeremy9959 opened this Issue Aug 29, 2018 · 5 comments


None yet
5 participants

jeremy9959 commented Aug 29, 2018

I recommend teaching the commands rm and rmdir for handling files and directories, and not teaching novices the rm -r command. New users of the shell will benefit from the protection you get from rmdir. Teaching the two commands also emphasizes the difference between files and directories.


This comment has been minimized.


jttkim commented Aug 30, 2018

Minimising the risk of frustrating and potentially serious mistakes is surely a good idea, but the protection achieved by hiding the -r option to rm from novices is bound to be rather short lived, as many will find out about rm -r via Google and in stackexchange etc. From this perspective, mentioning -r and having that "With Great Power Comes Great Responsibility" callout in episode 3 is a good approach. That way, learners may recognise rm -r as a potentially hazardous tool when they encounter it in blogs, forum posts etc., and be less likely to cause themselves grief when experimenting or after somewhat naively adopting it.

As an aside, I would not want to overemphasise the difference between files and directories, as a directory is a special file after all.


This comment has been minimized.

mellertd commented Aug 31, 2018

Would it make sense to present rmdir as an option, and explain the functional difference?


This comment has been minimized.


jttkim commented Aug 31, 2018

@mellertd I can't think of any problem with including rmdir, other than the usual "too much content". Perhaps mentioning rmdir in a callout or exercise would be a way to add that without adding too much additional load.

It is an optional addition, as learners can be left to discover and find out about rmdir without putting them at too much risk of making costly mistakes. And if they don't find it, they perhaps don't need it, like myself -- I almost never use it.


This comment has been minimized.

dvalters commented Nov 21, 2018

This got discussed before in #337, #336, and was removed in PR #384. (I just came across this issue looking for a instructor checkout issue to tackle!)


This comment has been minimized.


gcapes commented Nov 22, 2018

My thoughts are that this doesn't really add much conceptually - it's just another command, so the too much content argument is strong here. The lesson already teaches how to delete both files and directories containing files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment