Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am working on server files temporarily through filezilla in ubuntu 11.10. Sometimes when i close the file from my IDE, filezilla crashes and it does not working properly. If i try to close the filezilla, it does not closes. So, is there any way to close the filezilla through terminal ? Any help kindly appreciated. Thanks.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

If a process becomes unresponsive, you can force kill it from the terminal with

pkill -9f process-name

E.g.

pkill -9f filezilla

share|improve this answer
    
Thanks Julio.. :) –  Paulraj May 12 '12 at 6:58
    
You should try without -9 first (but still with -f). Using -9 kills it with the KILL signal. If you can kill it with the TERM signal, it has a chance to clean some things up first (for example, it may be able to write the contents of open file buffers, or explicitly release resources that might not be as efficiently reclaimed by the system following abrupt termination). So I recommend pkill -f process-name first. –  Eliah Kagan Mar 25 '13 at 17:28
add comment

I followed below steps to close filezilla.

In terminal, type below to list all running processes.

ps -A

This will give you the list of running processes. Find the process id which is having the name "filezilla" and kill the process. In my system the process id is 1759.

kill 1759

Filezilla will close instantly. Thanks.

share|improve this answer
1  
Tip: You can pipe the output of ps to grep to easily filter out other processes. That is, ps -A | grep filezilla . –  skytreader Mar 25 '13 at 17:29
add comment

Due to the amount of times filezilla crashes i have made a command that kills it straight away from the above, you can use this to run any command but in this case i have done it for filezilla.

Create a new file, call it what you want just make sure it has the command extension.

ive called mine killzilla.command

Inside the file it has one line

pkill -9f filezilla

Now as soon as filezilla locks up I double click on that run it in terminal and instant death to the pain in me depositor

share|improve this answer
    
As there, it's really best to try killing with SIGTERM before sending SIGKILL. –  Eliah Kagan Mar 25 '13 at 17:30
    
i dont know how i missed your comment up there, not looking properly no doubt, I will create another command file. liek i said it really does happen a lot. I can tell you exactly when it happens too, its the right click menu that does it for me every time, if i happen to be flickign between edits and fz a and i happen to mis click and clip the menu shut that is exactly when it locks up. i probaly do that a couple of times a week. –  chris Mar 25 '13 at 17:40
1  
You may find it a bit challenging to automate this well, though it can be done. Sending SIGKILL immediately after SIGTERM will often prevent any SIGTERM handling from finishing, and SIGKILL might even arrive before SIGTERM. The longer you want, the less likely SIGTERM handling is still going on, but the more likely (if it was successful) the user has already launched another instance. Even sleeping for 250 milliseconds carries a significant risk that the user has launched the application again. The solution is to get the PID itself (not immediately reused), then use the kill command. –  Eliah Kagan Mar 25 '13 at 17:43
    
I just have two separate files sitting on my desk top. I could just open the terminal but I am being lazy that will pass no doubt as soon as windozy gets out of my system, 15 years on there its hard to shake :) I should be okay myself but its good to know this kind of thing. I'm learning more by the day about Linux. I've only been working with it for 12 months or so but there is always something new and interesting coming along. Thanks for the pointer by the way its certainly useful to know. –  chris Mar 25 '13 at 18:23
    
Using two separate, manually invoked scripts for sending SIGTERM and SIGKILL is also a perfectly good solution! You may want to update your answer. You can use the edit button to change any of your questions or answers. –  Eliah Kagan Mar 25 '13 at 18:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.