Dear Mr. Malkiat, you may use rm command with switches like: $ rm -rf <dir Name> This removes the directory and any other subdirectory their in and does it forcefully so it will not ask you for delete confirmation.
yogesh On Mon, 2003-07-28 at 03:18, Arindam Dey wrote: > On Sat, 2003-07-26 at 19:58, MALKIAT BENIPAL thus hollered from the roof > top : > > Dear Mr.Dey, > > > > I am sorry that I am contacing u offlist for my problem as I hope that > > I wud receipt a prompt reply for the same. > > > > In dos if we wish to remove a non-empty directory, we may use the > > deltree command. But what is the command for removal of a non-empty > > one in linux. I tried rmdir and rm commands in linux with all their > > available switches but of no avail. It asks for removal of all the > > subdirectories and files individually under the main directory that I > > intend to remove. I find it very irritating, particularly when the > > directory is large one. > > > > So pl. guide what is Command for removal of a non-empty directory. > > Also pl. provide with Syntax for confirmtion as well as without > > confirmation before removal of a non-empty directory. > > > > Thanks in anticipation > > > > > > malkiat > > Firstly :- Please do not contact me off list. If you ask some questions > on the list then the subsequent answer may be archived there for future > use by somebody else facing the same problem. In future kindly ask the > questions on the list. > > Secondly :- As to your problem , you neglected to mention the > distribution you are using. I am assuming it is RedHat. For deleting > directories recursively you can use rm -rf /path/to/dir. Be careful be > very very careful when playing around with rm -rf. You have been warned. > If you want to delete the directory interactively that is if you want it > to prompt you with a yes/no option before deleting the contents in the > dir then you can use rm -ri /path/to/dir > > But if you are using a distro like RedHat the command rm is aliased as > rm -i by default. To get around this you can either put a "\" before the > rm command without the quotes of course or you can unalias rm. So to > delete recursively all the directories without prompting > > [EMAIL PROTECTED] Knoppix32]#\rm -rf /path/to/dir > OR > [EMAIL PROTECTED] Knoppix32]#unalias rm; rm -rf /path/to/dir > > If you were a normal user RedHat does not alias the rm command then you > can simply use rm -rf. Further help on alias you can get from "man > alias" it is a bash built in command. > > Bye, > > -- > Arindam Dey > > The mind is not a vessel to be filled > but a fire to be kindled. > > GPG FPR: B8E3 219E F129 F970 F4A7 BC50 9636 504A BEDF 5739 > > > _______________________________________________ > ilugd mailing list > [EMAIL PROTECTED] > http://frodo.hserus.net/mailman/listinfo/ilugd _______________________________________________ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd