1833798 Members
3141 Online
110063 Solutions
New Discussion

Re: rm -i stops

 
SOLVED
Go to solution
T G Manikandan
Honored Contributor

rm -i stops

Whenever I do a
rm -i
it just stops responding,
I cannot tell not responding but when I interrupt it returns back to the prompt.
ALso ftp gives the same result.
No messages in syslog.log.

But rm -f works fine.
Some solutions please

Thanks
18 REPLIES 18
Dirk Wiedemann
Respected Contributor

Re: rm -i stops

Hi,

please do a test:
create a testfile
rm -i testfile
without prompting type a "y" or "n". Anything happened?

regards Dirk
T G Manikandan
Honored Contributor

Re: rm -i stops

Yes,it prompts for 'y' and 'n'
But when i give y or n that's it.it just stops.

Thanks
Helen French
Honored Contributor

Re: rm -i stops

Normally, rm hangs occur because of *very* small buffer cache size. A possible solution would be to enable DBC with dbc_max_pct (to 20% ?) or increase buffer cache to around 10% of physical memory.
Life is a promise, fulfill it!
T G Manikandan
Honored Contributor

Re: rm -i stops

THanks for the reply.

dbc_max_pct is 50% on my machine.
I don't know why I have so much amount of buffer cache.

The memory on the machine is 4GB.

Thanks
Stefan Farrelly
Honored Contributor

Re: rm -i stops


Very intersting. I can see only 2 possibilities;

1. rm -i needs to interact with your terminal correclty to get the y or n response. Possibly you type y or n but this isnt getting back to the rm command. Try it from another window or terminal or shell or on the console.

2. rm -f says it ignores permission problems (check them) and diagnostic messages so possibly you have a problem and rm -i detects it but rm -f ignores these problems. It could be hardware (have you checked xstm -> logtool for any hardware diagnostic errors).
Im from Palmerston North, New Zealand, but somehow ended up in London...
Dietmar Konermann
Honored Contributor

Re: rm -i stops

Hmm, the question seems to be what is blocking the rm... I would suggest to use tusc. Maybe we get an idea then.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Volker Borowski
Honored Contributor

Re: rm -i stops

Hi,

this looks unusuall indeed.
Check if "rm" is really "rm".
Any alias set ?
Substituted by a script to do additional stuff ?

Volker
Bill Hassell
Honored Contributor

Re: rm -i stops

To determine just what rm you are using, use the type command as in:

type rm

This is a standard alias (POSIX shell and Kshell) for whence -v and what this does is to report exactly what rm will look like. For instance, it might report that rm is an alias to /tmp/badcommand which is very bad.


Bill Hassell, sysadmin
harry d brown jr
Honored Contributor

Re: rm -i stops

TG,

Once you figure out WHICH "rm" you are using:

which rm


then find where the rm commands are:

whereis rm

THEN,

TG, you need to FIX this ASAP:

dbc_max_pct is 50% on my machine.


dbc_max_pct for 4GB should be about 15% MAX, but more likely like 10%!!!

dbc_min_pct should be about 5%!!

live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: rm -i stops

TG,

Also on the "rm" thing, this isn't an NFS or samba share is it??

Also, what does /etc/nsswitch.conf look like???


live free or die
harry
Live Free or Die
T G Manikandan
Honored Contributor

Re: rm -i stops

I did a which rm
it is

/usr/bin/rm

type rm gives
rm is a tracked alias for /usr/bin/rm

The nsswitch.conf files has its reference to files for all the entries.


Thanks
harry d brown jr
Honored Contributor

Re: rm -i stops

TG,

Can you "cat /dev/null > filename" to the files you want to rm??

Do you have acl's turned on?

Does this occur on EVERY filesystem?

live free or die
harry

Live Free or Die
T G Manikandan
Honored Contributor

Re: rm -i stops

I do not have ACL's turned on.
I just do a touch filename and then use
rm -i filename.

Also ftp behaves the same.

I do a ftp
username
then just stops.


THanks
Dietmar Konermann
Honored Contributor

Re: rm -i stops

Please, use tusc with your rm command and post the results here.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Animesh Chakraborty
Honored Contributor

Re: rm -i stops

Hi TG,
Is it happening for all the users you logged on or just a particular user?
Also please check your .profile and shell.
Did you take a backup?
T G Manikandan
Honored Contributor

Re: rm -i stops

I have attached the tusc command output.


This problem is more with a particular user.
If I login as this user and switch to some other user I face the similar problem.

I do not have any .cshrc and .login files for this user.

this is the stty -a output.

speed 9600 baud; line = 0;
rows = 0; columns = 0
min = 1; time = 1;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop

Dietmar Konermann
Honored Contributor
Solution

Re: rm -i stops

To be honest... I expected to get a complete tusc output to see the context. :-)

But nevertheless, it's your "-cread" stty setting that worries me. Could you try a "stty cread" before doing the rm -i?

If that does not help, we should check if it's the stty setting is involved at all. Take a "good" user without problems and do a.

stty -g >/tmp/stty-settings

Then logon as the "bad" user and enter:

stty $(cat /tmp/stty-settings)

Let's see what happens...

Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
T G Manikandan
Honored Contributor

Re: rm -i stops

Thanks Dietmar,

I think it is working fine now.
But still I am not sure as it is not stable.

Thanks for your help.
I will revert incase there is problem.


Thanks for all the replies.