From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,9d4ddb40c4e8df0a X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-10-06 17:56:01 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!olivea!decwrl!pa.dec.com!kees.zso.dec.com!stoppani From: stoppani@kees.zso.dec.com ("Pete Stoppani") Message-ID: <9310062310.AA27025@kees.zso.dec.com.zso.dec.com> Subject: re: OSF trashcans,problems and suggestions Date: Wed, 06 Oct 93 16:10:07 -0700 X-Received: by usenet.pa.dec.com; id AA29809; Wed, 6 Oct 93 16:10:11 -0700 X-Received: by pobox1.pa.dec.com; id AA16697; Wed, 6 Oct 93 16:10:09 -0700 X-Received: from localhost by kees.zso.dec.com.zso.dec.com (5.65/DECwest-WS_HA-cjf-30Jun93) id AA27025; Wed, 6 Oct 1993 16:10:08 -0700 X-To: comp.sys.dec.usenet@pa.dec.com X-Cc: GRANT@DECPA.ENET.dec.com, saether@decwet.ENET.dec.com, bruce@decwet.ENET.dec.com, stoppani@kees.zso.dec.com X-Mts: smtp >>Trashcans under OSF1 have major problems in that >> >> 1) they are not inherited by subdirectories >> 2) they are plauged by file nameing problems is #2 above in reference to the caveat that if you attach more than one directory to the same trashcan you can get file name collisions? one way that advfs could avoid this problem is by tagging the files in a trashcan with the original file's parent directory's inode number. then there would not be file name collisions. we'll look into it. >> >>Is it feasable to change advfs such that: >> >> a) calls to mkdir, or some lower system call will check if >> the parent directory has a trash can, and inheriets this attribute? >> yes this is feasible. however, others have argued against this approach because: 1) now you have multiple directories attached to the same trashcan and can have file name collisions. the argument is that it is better to force the user to make all trashcan attachments manually so they are aware of how their trashcans are setup. 2) not all directories need trashcans. if mkdir did the attachment then you would waste disk space with files in the trashcan the you are not interested in recovering. 3) system admins cringe at the thought of having automatic trashcans because they increase the amount of disk space used by trashcans. you can always create a mkdir script that does the automatic attachment of the trashcan directory. >> b) allow trashcans to be set up as a subdirectory of a current >> directory, such that: >> >> mktrashcan -R trashcan ${HOME} how about: find . -depth -type d -exec mt2 {} \; where mt2 is a script containing the following (there is probably a way to do this without a script): mkdir $1/trashcan mktrashcan $1/trashcan $1 >> setsup a trashcan subdirectory in each of directories from >> ${HOME} on down, ties each directory to its trashcan subdirectory? >> >> >>this scheme seems to work well togather, particularly if you tie it togather >>with a cleanup proceedure for cron that will remove files after so much time >>from all subdirectories called trashcan. The only real change to the os is to >>have the mkdir sys call check if the parent has a trashcan ... basically, the idea behind the mktrashcan command is to provide basic (low-level) support for trashcans. that way it is very flexible in how you can use it to setup trashcans. it was difficult to predict how people will want to use the trashcan feature so we made it as simple (and low-level) as possible so that it would be useful (especially if used in conjuction with other commands like cron and find). we'll take your suggestions into consideration for the next version. thanks, pete...