Rm using .# (recap) and some further thoughts.
The Grand Master
asg at sage.cc.purdue.edu
Tue May 14 01:58:53 AEST 1991
In article <1991May9.191652.26724 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
}In article <1991May9.025448.25243 at casbah.acns.nwu.edu>, navarra at casbah.acns.nwu.edu (John 'tms' Navarra) writes:
}|> 1) Rm .# does not support users naming files .# anything because they
}|> would subsequently be deleted.
}
} The convention of files beginning with .# being temporary and purge-able by
}the system is far older than Project Athena's "delete" package. Vendors have
}been shipping systems that search for and delete old .# files by default for
}many years, just as they search for and delete # files, ~ files, and in some
}cases a.out and core files.
Of the University systems to which I have had access one time or another,
(well over 50) only one has a crontab entry which deletes .# files. Though
it is not a new or unusual idea, it still is present on (my guess of course)
<< half of the UNIX machines in the world. While this does not make it an
absurd idea, it does most certainly make it non-standard.
}
}
} As I have pointed out in a previous posting, allowing users to delete files
}into a repository without a quota, and then to restore them, allows users to
}use the deleted-file space as a temporary file archive, unless it is
}constantly watched by the admins to make sure that this does not happen.
So what? So the user can use it as a temporary archive. If you read the
description of entomb, however, you will note that this problem is dealt
with if file space becomes important. The default is to allow the files
to remain 2 days. But as the filesystem gets more full, this time limit
gets smaller and smaller.
}
}|> 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:
}
} You would do well to actually look at our software, which is available in
}comp.sources.misc, before making up scenarios that might break it.
}
}% alias rm
}delete
}% alias rmdir
}delete
}% cd tmp
}% ls
}file1 file2 file3
}% rm *
}% cd ..
}% rmdir tmp
}%
To explain why this is absolutly horid, we must first examine the reason
behind:
% rmdir /tmp
tmp not empty: not removed
The purpose of this is to insure that you do not remove a directory before
moving any important files out of it. Let's say I use Jon's method. If I
have a directory project, and a file in that directory called important,
I could rmdir project, thinking that I already moved important to my save
directory. Say I now go away for a coupla days (to visit John Navarra at
Northwestern or something). When I come back, my important file is gone,
and I have no idea where it went. Using the normal method, this would
not have occured.
}
}In other words, if delete is used as it is intended to be used, replacing both
}rm and rmdir, it does the right thing in the scenario you described.
In John's scenario yes, but not in mine.
}--
}Jonathan Kamens USnail:
Bruce
---------
### ##
Courtesy of Bruce Varney ### #
aka -> The Grand Master #
asg at sage.cc.purdue.edu ### ##### #
PUCC ### #
;-) # #
;'> # ##
More information about the Comp.unix.admin
mailing list