I thought 'killall' would work, but I need to provide the "command" to kill. I'm really looking for a command that will kill all processes that have a particular file/directory open. Currently, my script fails on an 'umount' because there are several processes that have this filesystem open. The command 'lsof' is a good tool to determine which processes have a filesystem open, but I don't really want to write a script that parses through the 'lsof' output to capture PSIDs. Is there a linux command that can kill all processes that may have a particular filesystem open?
I have several users on handhelds and they like to let their sessions time out. Their zombie processes then cause record locks.I've come up with calls for killing the pids for any prior sessions started by a given user. This procedure would be executed in the .bash_profile.
Consider a situation in which you want to display only specific lines of contents from a file or of a command's output. Yes, we have head and tail commands. But, how to view all the lines of a file except the last one or vise versa when we don't know the count of lines in advance?
Here, I don't want the last line (in italic) to be included in the result since the last line is due to "grep bash" in the devised command "ps au | grep bash". Well, we can rewrite the devised command:
"ps au | grep bash | head -n 2"
But, again, here we are specifying the count of lines to be included. But, in the presented problem we don't know any count in advance!
Yesterday, I downloaded qt and gcc by using "synaptic package manager" tool.Where does those programs intstalled?Well, in windows the programs are installed in c:Program Files folder. Similarly, is there a specific folder that the newly installed programs are placed?
My wish is to launch some programs (chromium, pidgin and xchat on the first virtual desktop and the terminal, the file manager and geany on the second one). I also wish them to have the same size and place than they've had the last time I used them (just to keep them always at the same place). My researches haven't been successful for the moment cause the only idea I found was lxsession-edit which doesn't do exactly what I want..
I am fairly new to Ubuntu and was wondering if anybody knows of a way to open up a number of programs and placing them in specific spots programmatically. Basically, I'm trying to avoid having to open my IDE, multiple terminal windows, browsers, etc... and then having to place them all in the exact position I want when my machine boots up. Ideally, I could say:Program A, is placed on Monitor 1, workspace 1, at position 0, 0, with height and width 600 x 400. Program B, is placed on Monitor 2, workspace 2, at position 600, 500, with height and width 1000 x 600
I am running an ubuntu 10.10 with an Intel i3 on a Gigabyte motherboard. I use it mainly as an HTPC, so it is connected (via HDMI) to a Samsung LCD TV (LA40A450C1V). Do I need to install a specific display driver? if so - how do i do that?
I noticed that while Compiz has every keyboard shortcut imaginable for moving windows between desktops, there's no shortcut for moving a window to a specific display when using dual monitors.
So far, I've found the best method is to use the command line automation tool: xdotool - [url]
Here's what I did:Test out the xdotool in a new terminal window using this command Code:
This should move your terminal window 100 pixels in from the top left of the leftmost display.
Find out the top-left coordinates of your rightmost display by using the Nvidia X Server Settings tool in Main menu > Administration or via the terminal:
Go to X Server Display Configuration and click the rightmost Display in the layout section. Its position offset should be displayed in the position field. Make a note of these two numbers.
Create a script to move your window, either to the leftmost screen or the rightmost screen, using this code or similar:
Remember, the number at the end is an argument that denotes the display (1 for left, 2 for right). Assign a keyboard shortcut to your custom shortcut. Repeat for the right display. Now when you press the keyboard shortcut, the active window should be moved to either the left or right display!
Today I run OpenOffice.org extensions update and it freezed fter showing me that everything was successful.When i xkilled it it refused tolaunch without any problem indication.killall soffice.bin didn't report "No process found" after 1,2,3...20 times.So I tried killall soffice.bin -i
When I return to my plasma desktop from hibernating, the font display is broken - kind of stripes It affects all kde and gnome programs, and all window decorations, but f.e. chrome displays the webpages well.What could cause this, and how can I fix it? My system is a dell inspiron 1525 with intel 965gm graphics card running kubuntu 11.04 with no kde ppas enabled.
the process is mcelog. When I do as root kill -9 2323 which is pid of mcelog the process is not killed. I tried doing the same from top, press K and enter pid of mcelog. doing ps auwx | grep mcelog I see there are several results. I tried killing all of them like kill -9 2355 2341 3425 2345. But re-running the above commands still shows them as running. How else would I troubleshoot this to avoid restarting of the box.
I installed new ati radeon drivers in the morning because i was getting display/screen deformation when using some programs (like vertical lines and so on). Now everything is just fine but i can't get 3d accelerator to work and due to this some games are running very slow. I am a new linux user. I have done everything i know and searched this from the internet but i can't get 3d acc. to work again. i have installed new drivers over the old ones (or i don't know; mesa?)
I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.
How to kill grub2? Even with a 20 second hard-drive delay grub2 throws a error: no such partition and will not boot to a floppy. I know there is no partition I deleted all and started over. How do I kill grub so I can install fresh? I can boot to a thumb drive with gpart how do I clear the partition table and bootstrap?
Ctrl-c doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor, and can't do much else.What's the easiest way to force that process to die now without losing my terminal?
Summary of answers below:Usually, you can Ctrl-z to put the process to sleep, and then do "kill -9 process-pid", where you find the process's pid with 'ps' and other tools.On Bash (and possibly other shells) you can do "kill -9 %1" (or '%N' in general) which is easier. If Ctrl-z doesn't work, you'll have to open another terminal and kill from there.
This is a humbling experience for a long time MS admin/tech.I am wanting to build a file server fr my home network. So, I downloaded and installed FreeBSD 8.1 last night.Wanting a more familiar interface, I downloaded and tried to install KDE. It loads and asks for language. Then I select "Install kubuntu".
The kubuntu logo and a progress meter pop up for a while. Eventually the screen goes black and nothing else happens. I have to reboot. If I take the CD out it boots to FreeBSD.Am I missing something? Kubuntu never asks anything regarding partitioning. Is FreeBSD an os like DOS and kubuntu a GUI like Win 3.1 or is kubuntu more like XP with a GUI built in to the os? If it is the latter, how do I get it to kill the FreeBSD install?"Try kubuntu without installing" does the same thing.
I have a big problem with one of my processes named "mbusd" ;it is an opensource modbus RTU/TCP gateway when I plug USB to serial convertor to it my laptop without this process linux makes virtual ttyUSB very fine and when I unplug it it removes except some times (SOME TIMES not all the times) that I run mbusd process to work with, at that time during mbusd process work when I unplug USB/serial converter the virtual ttyUSB does not disappear and mbusd does not exit too and it turnes in something like this when I get ps -aux: mbusd [defunc] at this time I can not even kill it with -9 or -15 signals and pluging back the converter does not solve the problem too and mbusd does not exit or start to run again.