This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have a doubt with the rmdir command. What is the exact difference between rmdir -p and rmdir -R? The documentations says, -R option deletes the files in the directory and the former just deletes the directory. But my question is when a directory is deleted, where will the files be? They would also be deleted/ Or is it that rmdir -p throws an error if there are any files in the directory that we specified?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
when a directory is deleted, where will the files be
That depends on which command that you use. If you use rmdir -p, you need to ensure the directory is empty (the directory can contain another empty directory and so on) or else you'll get an error. If you use rm -r, it'll delete everything regardless whether the directory is empty or not.
BTW, I don't see any see any option for rmdir -R in my bash, did you mean rm -r?
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4