From owner-freebsd-isp Sat Feb 22 09:51:43 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA28607 for isp-outgoing; Sat, 22 Feb 1997 09:51:43 -0800 (PST) Received: from brc.minsk.by ([194.226.121.36]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA28590 for ; Sat, 22 Feb 1997 09:51:30 -0800 (PST) Received: (from uucp@localhost) by brc.minsk.by (8.8.2/8.8.2) with UUCP id OAA17052 for freebsd-isp@freebsd.org; Sat, 22 Feb 1997 14:14:47 +0200 (EET) Received: from david (david [150.97.0.2]) by wvb.gomel.by (8.7.5/8.7.3) with SMTP id NAA06842 for ; Sat, 22 Feb 1997 13:37:01 +0200 (EET) Received: by david with Microsoft Mail id <01BC20C6.A2794040@david>; Sat, 22 Feb 1997 13:45:16 +-200 Message-ID: <01BC20C6.A2794040@david> From: David Stickney To: "'FBSD ISP'" Subject: Answer to Big Directories Date: Sat, 22 Feb 1997 13:45:14 +-200 Encoding: 74 TEXT Sender: owner-isp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Dear ISP'ers I thought I would share the results of my questions. > while : ; do > mkdir x > cd x > done > > 1. How can you prevent users from running this in their home directory, > without cutting off their shell account Preventing this can only be achieved by not letting users have shell accounts, or rewriting the OS.. (?) Controlling the effects can be accomplished by Disks Quotas (Bradley Dunn). Other Ideas such as shooting the user, were viewed by management too stern, although they agreed to allow me to stick toothpicks under his fingernails. ( Sergey explains that he read it in a white paper about UNIX security and wanted to see if it worked.... Some peoples kids...) As for fixing it; Lots of Good Answers, several would even work.... "rm -r works by creating a command line with all the subdirectories included, ie. in effect rmdir x/x/x rmdir x/x rm x. This fails when the maximum command line length is reached" (John Beukema) Funny, I read the man page for rmdir, it didn't mention any parameters.. "Try this... 1. cd to x (first level) 2. find . -depth -exec rmdir {} \; 3. cd .. 4. rmdir x If find doesn't blow up because of all the subdirs, it should work." (Chaz} Blew Up.. It reached about 1/3 up the structure and said it was too long.. Michael Bryan had the most original answer,, included compiling. .. As for Mounting Unmounting, fscking, and the like, sounded like to much work, (I'm lazy) Paul Danckaert, John Beukema and Richard Hodges all had the right Idea, Here is what I did and it worked on a directory with 900 subdirectories. In the directory, do while : ; do cd x done When It starts bitch'n at you hit control-c ( I'm lazy) Then run : While : ; do cd .. rmdir x done ^c to stop... It only took about 15 seconds on a 486/66 with LB IDE Roubles are in the Outbox, and it should take 2-3 weeks to the US, holler it the mail gets eaten by the mail system here, they like to open mail with US addresses, (Maybe you have heard of Belarus) Thanks everyone, Someday I hope to have a real IP connection so I can sign up to the list and read everything.. Best, Dave