Re: How do I unlock a file ? / SOLVED !
- From: SYNass IT Ubuntu / Linux <i-ubux@xxxxxxxxxx>
- Date: Thu, 10 Apr 2008 08:07:43 +0800
On Wed, 2008-04-09 at 08:35 -0700, Smoot Carl-Mitchell wrote:
On Wed, 2008-04-09 at 07:45 +0200, Mario Vukelic wrote:
I believe the reason for the existence of rmdir in addition to rm is a
safety consideration: if you use rmdir, you can be absolutely sure (even
when running it from a script) that a directory will _only_ be removed
if it contains no files.
rmdir historically existed before the recursive flag to rm. In the very
early days of Unix (1970s), you had to manually empty a directory before
deleting the directory. rmdir was originally a setuid program with root
privileges. Only root could add or remove files which were directories.
Later on the BSD folks added a rmdir() system call which allowed
ordinary users to remove their own directories, but they still had to be
empty.
If you could delete non-empty directories without deleting the
referenced files, you can end up with files without a reference in any
directory which would be a bad thing. Explicitly deleting the file
references insures the file reference count in the file inode gets
decremented correctly. The "-r" flag to rm automates what was before a
manual process.
--
Smoot Carl-Mitchell
System/Network Architect
smoot@xxxxxxx
+1 480 922 7313
cell: +1 602 451 9005
Hi and thanks once more for your efforts and feedback !
Mario has explained me somewhat similar. ;-)
Yeah long ago, in the 70'ies I worked with MVS and VM'es ...
... in the late 80'ies our company used CTIX on a Convergent and
as "administrative user" I was happy to have a SE for system
maintenance !!
So truly vaguely I remember some things again after this long long
time !!! ;-D
Good to get pointed to these more sensitive commands again to avoid
problems !
Cheers, svobi
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- References:
- How do I unlock a file ?
- From: SYNass IT Ubuntu / Linux
- Re: How do I unlock a file ?
- From: Simon Skogh
- Re: How do I unlock a file ?
- From: Smoot Carl-Mitchell
- Re: How do I unlock a file ? / SOLVED !
- From: SYNass IT Ubuntu / Linux
- Re: How do I unlock a file ? / SOLVED !
- From: Mario Vukelic
- Re: How do I unlock a file ? / SOLVED !
- From: SYNass IT Ubuntu / Linux
- Re: How do I unlock a file ? / SOLVED !
- From: Mario Vukelic
- Re: How do I unlock a file ? / SOLVED !
- From: Smoot Carl-Mitchell
- How do I unlock a file ?
- Prev by Date: Re: How do I unlock a file ? / SOLVED !
- Next by Date: Re: Recognizing Drives
- Previous by thread: Re: How do I unlock a file ? / SOLVED !
- Next by thread: Re: How do I unlock a file ? / SOLVED !
- Index(es):
Relevant Pages
|