Question on Linux Binary


 
Thread Tools Search this Thread
Operating Systems Linux Question on Linux Binary
# 1  
Old 04-16-2014
Tools Question on Linux Binary

Hi All,

On linux system copied a /bin/kill to /bin/killlatest, when i tried to kill a command using /bin/killlatest it is failing with below errors

/bin/killlatest 12345
ERROR: no "killlatest" support.

Please help on this.. My ideas is to write a wrapper over killl command to find out who invokes the command from which machine and port.

Last edited by Scrutinizer; 04-16-2014 at 12:41 PM..
# 2  
Old 04-16-2014
The command expects to be named 'kill' and apparently checks for this. It's not unheard of. Some commands, like busybox, incorporate many programs in one executable, and test what name they're run as for what program to be.

Writing a script wrapper for 'kill' is a bad idea, since many system commands will want 'kill', and changing it in any way may break them. Use an alias instead, aliases will only work for logged-in users.

Last edited by Corona688; 04-16-2014 at 12:49 PM..
# 3  
Old 04-17-2014
Killl command question

I moved all the kill command in /bin,usr/bin and what ever location wheris kill returns.

My path is also set to /usr/bin where there is no kill .. but when i run the kill command it is executing

kill 123456
-bash: kill: (123456) - No such process


which kill
which: no kill in (/home/dbbuser/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/dell/srvadmin/bin)


dbbuser@sn7024192-dbb4u:~> sleep 400 &
[1] 2282
dbbuser@sn7024192-dbb4u:~> kill 2282
[1]+ Terminated sleep 400


Please throe some light on this .. I am clueless...
# 4  
Old 04-17-2014
Your shell has a builtin kill. An example using BASH:
Code:
$ echo $BASH_VERSION
4.2.24(1)-release
$ which kill
/bin/kill
$ type kill
kill is a shell builtin
$ type -a kill
kill is a shell builtin
kill is /bin/kill

Note that the builtin is preferred over the external binary.

Regards,
Alister
# 5  
Old 04-17-2014
Quote:
Originally Posted by sridhar8183
I moved all the kill command in /bin,usr/bin and what ever location wheris kill returns.
You really should undo that before something really bad happens. Your system needs that!
# 6  
Old 04-18-2014
Thanks for the info, I have reverted the changes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert Binary File To Hex In Linux

dHi, I have the attached file(actual file can be extracted post unzipping it) & i am trying to use the following code for coversion to hex format. Starting hex value is 84 which is start of the record & termination is done using 00 00 followed by 84(hex) which i can see in the dump clearly using... (14 Replies)
Discussion started by: siramitsharma
14 Replies

2. Shell Programming and Scripting

Want to convert an expect script to binary in Linux

Does anyone know how to convert an expect script to binary in linux?. (3 Replies)
Discussion started by: John Wilson
3 Replies

3. UNIX for Advanced & Expert Users

Linux fdisk question (Oracle Enterprise Linux)

OS: Oracle Enterprise Linux 6.2 Hypervisor: VMWare workstation 9 I created a VM and attached a 7gb virtual disk to it. Using fdisk , I partioned the disk like below. The filesystems mounted on this is working fine. But I am seeing the message Partition n does not end on cylinder boundary.... (2 Replies)
Discussion started by: kraljic
2 Replies

4. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

5. Shell Programming and Scripting

New to Linux, have some simple question

Hi All, Here is the problem: I have done a c++ code in Visual Studio 2010, it's a simple project that only have one main function which takes 2 parameters: an integer and a file that stores data. Now, I am asked to write a shell script in linux to execute my main function. I asked my professor... (1 Reply)
Discussion started by: EasonRU
1 Replies

6. UNIX for Dummies Questions & Answers

linux installation question?

Hi I accidentally installed another operating system after I had installed Linux and now I can no longer access your Linux system.any solution? Thanks (1 Reply)
Discussion started by: adam25bc
1 Replies

7. Linux

Request: Compile Earlier Version of XTIDE and upload XTTPD binary on 64 bit Linux

Can someone try to compile this older version of xtide (attached) on 64-bit Intel/Linux and upload the xttpd binary? I have a friend who needs an older version up and running because the newer version does not support his required harmonic files. Thanks! (7 Replies)
Discussion started by: Neo
7 Replies

8. UNIX for Advanced & Expert Users

Making one binary image containing boot loader and linux

Hi, I want to have one binary image that contains both my boot loader as well as the OS(linux) image at pre defined offsets which i can use to program flash . Can anyone help in this direction? Regards Subrata (0 Replies)
Discussion started by: subratasaharia
0 Replies

9. UNIX for Dummies Questions & Answers

Question on DSL Linux

Hi, I downloaded the DSL Linux, I am able to boot and work on it. But I want to install this on my old laptop. How do I do that? Please advise. Thanks. (1 Reply)
Discussion started by: samnyc
1 Replies

10. UNIX for Dummies Questions & Answers

linux newbie question...

I'm running Vector Linux on this computer, and everythign works fine, except for the NIC. I run netconfig, and then when I reboot it says: DC21140 at 0x9400(PCI BUS 0, device 11) h/w address 00:00:C0:2E:13:dC, and reqquires IRQ 9(provided by PCI BIOS) Setting up net subsytems. ... (5 Replies)
Discussion started by: Corey
5 Replies
Login or Register to Ask a Question