Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set Ctrl C as break

Status
Not open for further replies.

nfaber

Technical User
Oct 22, 2001
446
US
I am on Solaris 8. My Ctrl C key sequence is not working. When I have say a "find" command running, I want to be able to Crtl C out of it when it finds what I want, however the Ctrl C is not working, it just writes ^C to the screen and continues on with the find.

Any help is appriciated.
 
You should be able to set the option for the break to be -

stty intr \^C


Just bear in mind that the find command because it is streaming output to the screen may be hard to interrupt at the point you desire.

It may be a good idea to pipe the find command to a grep for the string or substring that you wish to capture.


Hope this helps you,


Steve
 
Steve,

Thanks for the reply, however it does not work. It seems ^C is set for my user login, but not after I su - to root. I tried running the stty intr \^C as root, no help.
 
After the su - root, try this:
stty intr ^C

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top