Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!cs.umn.edu!msi.umn.edu!widener!dsinc!ub!lyda From: lyda@acsu.buffalo.edu (kevin lyda) Newsgroups: comp.unix.admin Subject: Re: Rm using .# (recap) and some further thoughts. Message-ID: <75722@eerie.acsu.Buffalo.EDU> Date: 9 May 91 18:21:33 GMT References: <1991May9.025448.25243@casbah.acns.nwu.edu> Sender: news@acsu.Buffalo.EDU Organization: State University of New York at Buffalo/Comp Sci Lines: 67 Nntp-Posting-Host: sybil.cs.buffalo.edu ok... to start with, i'm a 20 year old undergrad who doesn't sysadmin a site. i'm thinking of getting unix for my pc and wanted to get some insight in how to administer it. however, this debate about how to delete is annoying.... the people who insist that deleteing by renaming to .# files is wrong are not listening! In article <1991May9.025448.25243@casbah.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John 'tms' Navarra) writes: > 1) Rm .# does not support users naming files .# anything because they > would subsequently be deleted. i seem to remember leafing through a unix manual that stated that .# files were temporary. in fact, when i edit files with emacs my temporary backups are .# files. > 2) Rm .# takes a LONG time reaping files from the system because it has > to search thru every directory on the system looking for .# files. please remember jon's article concerning cron functions. you mention it later during this, but you still use this. knowing that users need to sleep, thereby implying a certain time of day where system load is low, having the system bouncing through directories shouldn't be a hardship at, say, 3am. > 3) Rm .# files do not hide from ls -a commands. Despite what Jon has > said, i don't think this command is all that uncommon. if it bugs you that much, here's a solution: modify ls! make a -# option for christ's sakes! you are in computer science, right? problem solving. ls -a shows certain hidden files that should stay hid. problem. make ls have two levels of info hiding. solution. > 4) This problem of deleting large numbers of files brings up a quota > issue. Many systems have quotas for its users and deleting files > to the current dir still adds onto the quota. It is possible to > discount .# files (I think) but why bother if you can just move them > to a different dir without a quota or one considerably larger that > is not affliated with yours. please tell me you see the problem with that. joe schmoe has 5 gifs in his account. he only has room for 4. so once a day he deletes one and undeletes another. now multiply joe scmoe by 100 users. believe me people will do it. you should see the vms users here with temp disk storage. i had a friend knock on my door at 2am so he could log in and access his files on tdisk before a 48 hour period had expired. > 5) I thought of this one a little while ago. Say you have a directory > tmp with some files in it. Now I will take this example from the > viewpoint of a novice and not so novice user. Say I want to get rid > of this dir tmp so I do the following: [novice user example] one solution: modify rmdir so that you can undelete directories. rmdir tmp would result in a directory named .#tmp. another solution: make it so that rmdir doesn't care if there are .# files in a dir. have it /bin/rm them and then do an rmdir. [More experienced user] one solution: if you rm a .# files, the system can assume you really don't want it. so /bin/rm it. another solution: if you rm a .# file it will become a .#.# file. this is a bad solution but a simple delete script will end up doing this. would the people debating please try to do the following: read. i wasn't the first person to give these solutions to your points. kevin