Date: Mon, 8 Jul 1996 18:37:37 +0200 From: grog@lemis.de (Greg Lehey) To: questions@freebsd.org Message-ID: <199607081637.SAA10405@allegro.lemis.de>
next in thread | raw e-mail | index | archive | help
Helio Coelho Jr. - CompuLand Informatica writes: > >> Helio Coelho Jr. - CompuLand Informatica writes: >>> >>> Hi: >>> >>> There's a way to delete a directory tree, >> >> Yes. rm -rf tree >> > > Sorry!: > > without having to delete all the archives inside it ? > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You don't understand. In UNIX (and in DOS, for that matter), a directory is a way to find files (which may be archives). If you delete the directory tree, you no longer have access to the files (or archives). If you were to delete the tree without deleting the archives, you would not be able to access the files, but you would also not be able to use the disk space. For this reason, all operating system developers (and the people at Microsoft) consider this a Bad Thing. In fact, there are ways to do exactly this with UNIX, but I don't want to further confuse you with them at this stage, because I think I'm completely misunderstanding what you want to do. So, at the risk of repeating myself: >> Possibly. But first I need to understand what you really want to do. >> Can you give an example, please? A couple of possibilities spring to mind: 1. You want to delete only empty directories. 2. You want to delete subdirectories, but not the files in the main directory. Whichever it is, you haven't made your request clear. Do you make a distinction between archives and files? Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607081637.SAA10405>