Ubuntu :: Pipe And Kill Pidof Output?
Jan 13, 2010I want to kill a specific program with the kill -9 pid in a hole command. How do I pipe and kill the output from this command? pidof transmission |
View 9 RepliesI want to kill a specific program with the kill -9 pid in a hole command. How do I pipe and kill the output from this command? pidof transmission |
View 9 RepliesWe want to kill a process provided that only process name is given and we are to first find out the process id and then kill the process. Yes, in one go! That is, using pipe.
So, I tried this (the bold text):
[Code]...
A script uses the following command:
Code:
root:/var/tmp> pidof inetd
55
root:/var/tmp> kill -HUP `pidof inetd`
kill: bad pid '`pidof'
kill: bad pid 'inetd`'
Since "pidof" by itself works fine, does someone know why "kill" can't use its output
For instance, suppose I want to pipe the output of ps -A to a gtkdialog table.
View 1 Replies View RelatedI want to pipe the output of ls in a folder to a file (lets call it test.txt) but when i do so, but when i do ls > test.txt in test.txt there is also test.txt (logical
View 4 Replies View RelatedI'm trying to use the output from gdialog's input box in another command with no success. code...
View 3 Replies View RelatedI have a bug where WoW under wine is crashing my computer, and I want to get the data from the console, so I want to put it in a file, but I don't know how! None of the piping tutorials online helped at all.
View 2 Replies View RelatedI want to have the output of a program go to 2 different files but not going to standard out. Is there a way to do this in bash? I know that in Z shell its really easy. omething like: Code: echo "test" >> file1 >> file2 Would work. But in Bash it doesn't seem that easy. I know that tee will send the output to 2 files but it also sends it to STDOUT.Something like:Code: echo "test" | tee -a file1 file2 Would put the word "test" in file1, file2, and STDOUT. Is there a way to just send the output to file1 and file2?
View 2 Replies View RelatedI need to pipe the output of date command, to form a command like this:
mycommand -f 20110721
where 20110721 is current YearMonthDay.
How can I pipe the output of a shell command into a new buffer in Vim? The following obviously wouldn't work, but you can see what I'm getting at:
:!echo % | :newtab
Is there a way to process the output of a locate command on the spot within bash. The output is 3 lines, ex:
Code:
[root@server confluence]# locate .timestamp
/opt/confluence/confluence-persistent/index/.timestamp
[code]....
In a terminal in OSX I can pipe output to pbcopy and then go into a web browser and paste it. I tried this in Linux with xcopy but when I switch to the browser it just overwrites the clipboard with with whatever was in it the last time the browser was used. What works like pbcopy in Linux?
View 1 Replies View RelatedI'm following the "The Perfect Server - Fedora12 x86_64 [ISPConfig 3]" instructions and I am encountering an error when trying to build the rpm for courier-imap (from page 4 of the HOWTO).
The command I run is:
Code:
rpmbuild -ta courier-imap-4.6.0.tar.bz2
The error is below:
Code:
INFO: LOGIN, user=confmdtest, ip=[127.0.0.1], port=[0], protocol=SMAP1
INFO: LOGOUT, user=confmdtest, ip=[127.0.0.1], headers=0, body=0, rcvd=26, sent=610, time=0
sort: fflush failed: standard output: Broken pipe
[code]....
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.85697 (%build)
I've written a simple server in linux used fork to create a FIFO pipe.The server create two FIFO pipe.One for server read data from client and write data to client.Then another pipe for client read data from server and write data to server.When the server read data from a client used server-pipe and then write data to client.But ,if the client no read open the pipe,the server side write will be crashed because of a broken-pipe SIGPIPE. How to check whether the read side is opened?Or,how to catch the SIGPIPE,and then my server will still execute on,not crashed!!
View 5 Replies View RelatedAfter running the following command, I get:
[root@yukiko /]# find / -iname .bashrc
/home/clamav/.bashrc
/home/vpopmail/.bashrc
/etc/skel/.bashrc
/root/.bashrc
But I would like to have a command that prints a specific line by supplying the command with the line number, for example:
[root@yukiko /]# find / -iname .bashrc | getline(2)
/home/vpopmail/.bashrc
Is there such a command on CentOS?
I'm doing ping between 2 RH servers through a VPN site2site tunnel and in some times I got in the result pipe 2 and another pipe 3 as I mark it in blue color below.
e.g.
64 bytes from 192.168.1.10: icmp_seq=0 ttl=128 time=0.229 ms
64 bytes from 192.168.1.10: icmp_seq=1 ttl=128 time=0.287 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=128 time=0.278 ms
[code]....
What's the difference between pipe 2 and pipe 3 and what's the meaning of it?
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
Code:
$ sudo killall soffice.bin -i
Kill soffice.bin(3319) ? (y/N) y
[code]...
I tried to get process ID using pidof. It didn't give any error but a blank output at console Code: $ pidof -s instance1
$
But when I use ps -ef, I get the process ID Code: $ ps -ef | grep instance1
root 4174 21661 0 06:52 pts/1 00:00:00 grep instance1
provgw 30220 30219 28 06:46 pts/1 00:01:44 /usr/java/jdk1.6.0_18/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[Code].....
when i show status ricci on centos5.3x86_64 #service ricci status pidof: invalid options on command line pidof: invalid options on command line p is stopped how can i fix that bug ?
View 4 Replies View Relatedthe 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.
View 5 Replies View RelatedI have a computer with linux playing a movie in loop. And I want to stop playing movie in 22:00 . I wrote something like this in my script :
please note that the space in the command .
And what puzzled me is that I can succeed in running it in command line, but fail in crond service . I always get this warning: pidof : coomand not found.
I tried to get process ID using pidof. It didn't give any error but a blank output at console
Code:
But when I use ps -ef, I get the process ID
Code:
Actually i'm writing a shell script. So I thought if i can get the process ID directly using "pidof" it'd be helpful.
I'm trying to set a shortcut using the pipe key ("|", this one...) like "<Ctrl>|" and no luck. Is there any special way to set this like <Ctrl><Pipe> or <Ctrl>|| or something?
View 3 Replies View RelatedI cant seem to get the sound working and when I click on perference then sounds and go to the output selection it has only dummy output as a option.
View 3 Replies View RelatedI installed KMplayer but I cant play video files...No video output but can get only the audio output...So how to make this work for videos?
View 2 Replies View RelatedRunning 10.10 and win 7 on my HP dv6-2150us laptop and I'm having a few issues.
First how do I get HDMI audio output to my TV? I think I have just a integrated Intel graphics card. It works fine in windows but I can't seem to get it to work in Ubuntu. I tried searching but couldn't find anything pertaining to this issue.
I'm looking for an mp3 file in the firefox cache folder.I was thinking I could run the command 'find -size +2M' and pipe that output into the 'file' command to tell me which is an mp3, something like thisfind -size +2M | fileBut this doesn't work, what am I doing wrong?This is output Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...file -C -m magicfilesTry `file --help' for more information.
View 4 Replies View RelatedI am sure that this is very simple but I have installed sound juicer and the gstreamer plug ins. The problem is i still cannot select MP3 as an output output option
View 3 Replies View RelatedI don't know anything about ubuntu. Could you guys help me out. I'm pretty knowledgeable with windows if you guys need a printout of something let me know. My friends getting really frustrated about this. Help!!i
So here's the situation. He plugs his audio jack into his computer and then into the speakers but it still plays from the computer speakers.
I'm a UK based user and using a standard UK keyboard (Coleman based layout I think) although I have a backslash (to the left of the "Z", I can't type the character in any application. This is very frustrating when typing FQDNs amongst other things. How can I enable the backslash key for use with UK keyboard layouts. BTW I have tried all of the UK keyboards suggested in the keyboard layout dialogue
View 2 Replies View Related