Xref: utzoo comp.sys.hp:1275 comp.unix.questions:10350 Path: utzoo!attcan!uunet!husc6!uwvax!rutgers!apple!voder!pyramid!oliveb!elandes!dave From: dave@elandes.UUCP (D. Mathis) Newsgroups: comp.sys.hp,comp.unix.questions Subject: Re: Huge directories Summary: Huge directories - really open files Keywords: Huge directories Message-ID: <616@elandes.UUCP> Date: 26 Nov 88 20:07:32 GMT References: <706@prlhp1.prl.philips.co.uk> <515@auspex.UUCP> Organization: ELAN designs, Saratoga CA Lines: 30 In article <515@auspex.UUCP>, guy@auspex.UUCP (Guy Harris) writes: . . gives a method for compressing directories . . > 1) Make sure nothing is running that could create new files in the > directory. > 2) Make a new directory in the same parent directory as the directory > in question. > 3) Move all the files from the directory in question into the new > directory. > 4) Remove the now-empty directory in question. > 5) Rename the new directory to have the same name as the just-removed > directory. When I have to do this operation, I 'move' the directory to a new name, and make a new directory with the correct name as 'one' command. i.e. $ mv oldname newname ; mkdir oldname The window of vulnerability seems small enough that I have never seen a process fail for not having the 'correct' directory available. It also allows current processes to keep their files open, since the directory name isnt part of the file descriptor. Then I move the files from newname to oldname and remove newname. Are ther problems with this sequence that I have just never been bitten by? -- Dave Mathis, ELAN designs UUCP ...oliveb!elandes!dave