Re: root can not delete a directory ,why?

2005-12-22 Thread Mike McCarty

Robert Brockway wrote:

On Wed, 21 Dec 2005, Gene Heskett wrote:


Humm, you weren't perchance cd'd into the directory?



Actually unix will let you delete a directory that is in use.  Harley 


No, it will not.


Hahn once described this as sawing off the branch you are sitting on.

Eg:

$mkdir /tmp/foo
$cd /tmp/foo
$rmdir /tmp/foo
$pwd
/tmp/foo
$ls -a
$cd
$cd /tmp/foo
bash: cd: /tmp/foo: No such file or directory


The cwd has nothing to do with the OS, it is purely a way to instruct
the shell how to do globbing.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: root can not delete a directory ,why?

2005-12-22 Thread Mike McCarty

Gene Heskett wrote:

On Wednesday 21 December 2005 12:53, Realos wrote:


hi,

I am completely at loss. I can not delete following empty directory
as root.

drwxrwxrwx   2 root root   8192 Dec 21 18:14 kolab

I tried "rm -rf kolab", "rmdir -f kolab", "rm -fd kolab" but nothing
works.
Error message is:

rm: cannot remove directory `kolab': Device or resource busy



Humm, you weren't perchance cd'd into the directory?


Makes no difference. The cwd is a shell thing, not an OS thing
(unlike with MSDOS and Windows). It's just some shorthand
for telling the shell how to do globbing.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: root can not delete a directory ,why?

2005-12-21 Thread Robert Brockway

On Wed, 21 Dec 2005, Gene Heskett wrote:


Humm, you weren't perchance cd'd into the directory?


Actually unix will let you delete a directory that is in use.  Harley Hahn 
once described this as sawing off the branch you are sitting on.


Eg:

$mkdir /tmp/foo
$cd /tmp/foo
$rmdir /tmp/foo
$pwd
/tmp/foo
$ls -a
$cd
$cd /tmp/foo
bash: cd: /tmp/foo: No such file or directory

The primary cause of the error the original poster was concerned with is 
that the directory is a mount point and I see the original poster 
confirmed this was the case.


Cheers,

Rob

--
Robert Brockway B.Sc.   Phone:  +1-416-669-3073
Senior Technical Consultant Email:  [EMAIL PROTECTED]
OpenTrend Solutions Ltd.Web:www.opentrend.net
We are open 24x365 for technical support.  Call us in a crisis.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: root can not delete a directory ,why?

2005-12-21 Thread Gene Heskett
On Wednesday 21 December 2005 12:53, Realos wrote:
>hi,
>
>I am completely at loss. I can not delete following empty directory
> as root.
>
>drwxrwxrwx   2 root root   8192 Dec 21 18:14 kolab
>
>I tried "rm -rf kolab", "rmdir -f kolab", "rm -fd kolab" but nothing
>works.
>Error message is:
>
>rm: cannot remove directory `kolab': Device or resource busy
>
Humm, you weren't perchance cd'd into the directory?

>There is nobody logged on the pc except for me with only one login.
>
>Is there a way to check if there hard links on that directory? Or do
> you have any other idea.
>
>Any idea is much appreciated.
>
>
>--
>Realos

-- 
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules.  I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: root can not delete a directory ,why?

2005-12-21 Thread Realos

hallo,

> Realos wanted us to know:

>I am completely at loss. I can not delete following empty directory as root.
>
>drwxrwxrwx   2 root root   8192 Dec 21 18:14 kolab

Well, it was a mountpoint for some partition. umounting the partition
allowed rm operation.

regards,

-- 
Realos


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



root can not delete a directory ,why?

2005-12-21 Thread Realos
hi,

I am completely at loss. I can not delete following empty directory as root.

drwxrwxrwx   2 root root   8192 Dec 21 18:14 kolab

I tried "rm -rf kolab", "rmdir -f kolab", "rm -fd kolab" but nothing
works.
Error message is:

rm: cannot remove directory `kolab': Device or resource busy

There is nobody logged on the pc except for me with only one login. 

Is there a way to check if there hard links on that directory? Or do you
have any other idea.

Any idea is much appreciated.


-- 
Realos


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]