From: jamm on
Cool site! Thanks for sharing that one..

houghi wrote:
> And there also is pkill. read `man pgrep` A nice example:
>>>

don't forget killall.

From: noi ance on
On Sun, 07 Mar 2010 11:02:32 +0100, houghi typed this message:

> Sometimes I wanted to know what the PID of an aplication was so I could
> kill it. I used to do the following:
> `ps aux|grep $APPLICATION|grep -v grep`
>
> There is a much easier way: `pgrep $APPLICATION` houghi(a)penne : pgrep
> slrn
> 23193
>
> And there also is pkill. read `man pgrep` A nice example: houghi(a)penne :
> ps -fp $(pgrep -d, -x firefox) UID PID PPID C STIME TTY
> TIME CMD houghi 6850 1 0 Mar05 ? 00:00:00 /bin/sh
> /usr/bin/firefox -P Right houghi 6857 6850 4 Mar05 ?
> 01:39:48 /usr/lib64/firefox/firefox -P Right houghi 14934 1 0
> Mar04 ? 00:00:00 /bin/sh /usr/bin/firefox -P Left houghi 14941
> 14934 1 Mar04 ? 00:55:39 /usr/lib64/firefox/firefox -P Left
>
> These are thing I found with http://www.commandlinefu.com Look at their
> feed and you will see some things passing that you would never have
> known. Like the following:
> dig +short txt <keyword>.wp.dg.cx
>
> houghi(a)penne : dig +short txt opensuse.wp.dg.cx "openSUSE, , is a
> general purpose operating system developed by the openSUSE Project.
> After acquiring SUSE Linux in January 2004, Novell decided to release
> the SUSE Linux Professional product as a 100% open source project,
> involving the community in the de" "velopment process. The initial
> release was a beta version of SUSE Linux 10... http://a.vu/w:OpenSUSE"
>
> And another: `getconf LONG_BIT` to determine if you run 32 or 64 bit. or
> what about `watch -t -n1 "date +%T|figlet -f big" ` Or `vim -x file.txt`
> to have some encrypion on a file.
>
> Or `mv filename.{old,new}` to rename files.
>
> And I never heard of the ss.
> /usr/sbin/ss -p|grep STA|cut -f2 -sd\" Or just try /usr/sbin/ss
>
> And sometimes there are just interesting URL where the command is not
> that interesting, like http://infiltrated.net/blacklisted
>
> Or listening to BBC radio:
> local s;echo "Select a station:";select s in 1 1x 2 3 4 5 6 7 "Asian
> Network an" "Nations & Local lcl";do break;done;s=($s);mplayer -playlist
> "http://www.bbc.co.uk/radio/listen/live/r"${s[@]: -1}".asx";
>
>
> There are much more things on http://www.commandlinefu.com. A must if
> you are interested in CLI.
>
> houghi

Initially, I thought "Big Deal" and about to blow the post off, but I
got interested in the "ss" command and running so many of the commands.

Thanks Houghi its a great resource and website, I especially like the
way the provide screen shots for most of the commands.
From: JT on
On 10/03/10 23:53, noi ance wrote:
> On Sun, 07 Mar 2010 11:02:32 +0100, houghi typed this message:
>
>
>> Sometimes I wanted to know what the PID of an aplication was so I could
>> kill it. I used to do the following:
>> `ps aux|grep $APPLICATION|grep -v grep`
>>
>> There is a much easier way: `pgrep $APPLICATION` houghi(a)penne : pgrep
>> slrn
>> 23193
>>
Also possible: ps -C $APPLICATION
I admin, no gain in keyboard strokes, but it does give you also the
ps-output format. Certainly if you use -fC, for example
>> And there also is pkill. read `man pgrep` A nice example: houghi(a)penne :
>> ps -fp $(pgrep -d, -x firefox) UID PID PPID C STIME TTY
>> TIME CMD houghi 6850 1 0 Mar05 ? 00:00:00 /bin/sh
>> /usr/bin/firefox -P Right houghi 6857 6850 4 Mar05 ?
>> 01:39:48 /usr/lib64/firefox/firefox -P Right houghi 14934 1 0
>> Mar04 ? 00:00:00 /bin/sh /usr/bin/firefox -P Left houghi 14941
>> 14934 1 Mar04 ? 00:55:39 /usr/lib64/firefox/firefox -P Left
>>
>> These are thing I found with http://www.commandlinefu.com Look at their
>> feed and you will see some things passing that you would never have
>> known. Like the following:
>> dig +short txt <keyword>.wp.dg.cx
>>
>> houghi(a)penne : dig +short txt opensuse.wp.dg.cx "openSUSE, , is a
>> general purpose operating system developed by the openSUSE Project.
>> After acquiring SUSE Linux in January 2004, Novell decided to release
>> the SUSE Linux Professional product as a 100% open source project,
>> involving the community in the de" "velopment process. The initial
>> release was a beta version of SUSE Linux 10... http://a.vu/w:OpenSUSE"
>>
>> And another: `getconf LONG_BIT` to determine if you run 32 or 64 bit. or
>> what about `watch -t -n1 "date +%T|figlet -f big" ` Or `vim -x file.txt`
>> to have some encrypion on a file.
>>
>> Or `mv filename.{old,new}` to rename files.
>>
>> And I never heard of the ss.
>> /usr/sbin/ss -p|grep STA|cut -f2 -sd\" Or just try /usr/sbin/ss
>>
>> And sometimes there are just interesting URL where the command is not
>> that interesting, like http://infiltrated.net/blacklisted
>>
>> Or listening to BBC radio:
>> local s;echo "Select a station:";select s in 1 1x 2 3 4 5 6 7 "Asian
>> Network an" "Nations & Local lcl";do break;done;s=($s);mplayer -playlist
>> "http://www.bbc.co.uk/radio/listen/live/r"${s[@]: -1}".asx";
>>
>>
>> There are much more things on http://www.commandlinefu.com. A must if
>> you are interested in CLI.
>>
>> houghi
>>
> Initially, I thought "Big Deal" and about to blow the post off, but I
> got interested in the "ss" command and running so many of the commands.
>
> Thanks Houghi its a great resource and website, I especially like the
> way the provide screen shots for most of the commands.
>


--
Kind regards, JT

From: JT on
On 11/03/10 09:36, JT wrote:
> On 10/03/10 23:53, noi ance wrote:
>
>> On Sun, 07 Mar 2010 11:02:32 +0100, houghi typed this message:
>>
>>
>>
>>> Sometimes I wanted to know what the PID of an aplication was so I could
>>> kill it. I used to do the following:
>>> `ps aux|grep $APPLICATION|grep -v grep`
>>>
>>> There is a much easier way: `pgrep $APPLICATION` houghi(a)penne : pgrep
>>> slrn
>>> 23193
>>>
>>>
> Also possible: ps -C $APPLICATION
> I admin, no gain in keyboard strokes, but it does give you also the
> ps-output format. Certainly if you use -fC, for example
>
Of course that should be: 'I admit'...... Freudian typo? ;)
>>> And there also is pkill. read `man pgrep` A nice example: houghi(a)penne :
>>> ps -fp $(pgrep -d, -x firefox) UID PID PPID C STIME TTY
>>> TIME CMD houghi 6850 1 0 Mar05 ? 00:00:00 /bin/sh
>>> /usr/bin/firefox -P Right houghi 6857 6850 4 Mar05 ?
>>> 01:39:48 /usr/lib64/firefox/firefox -P Right houghi 14934 1 0
>>> Mar04 ? 00:00:00 /bin/sh /usr/bin/firefox -P Left houghi 14941
>>> 14934 1 Mar04 ? 00:55:39 /usr/lib64/firefox/firefox -P Left
>>>
>>> These are thing I found with http://www.commandlinefu.com Look at their
>>> feed and you will see some things passing that you would never have
>>> known. Like the following:
>>> dig +short txt <keyword>.wp.dg.cx
>>>
>>> houghi(a)penne : dig +short txt opensuse.wp.dg.cx "openSUSE, , is a
>>> general purpose operating system developed by the openSUSE Project.
>>> After acquiring SUSE Linux in January 2004, Novell decided to release
>>> the SUSE Linux Professional product as a 100% open source project,
>>> involving the community in the de" "velopment process. The initial
>>> release was a beta version of SUSE Linux 10... http://a.vu/w:OpenSUSE"
>>>
>>> And another: `getconf LONG_BIT` to determine if you run 32 or 64 bit. or
>>> what about `watch -t -n1 "date +%T|figlet -f big" ` Or `vim -x file.txt`
>>> to have some encrypion on a file.
>>>
>>> Or `mv filename.{old,new}` to rename files.
>>>
>>> And I never heard of the ss.
>>> /usr/sbin/ss -p|grep STA|cut -f2 -sd\" Or just try /usr/sbin/ss
>>>
>>> And sometimes there are just interesting URL where the command is not
>>> that interesting, like http://infiltrated.net/blacklisted
>>>
>>> Or listening to BBC radio:
>>> local s;echo "Select a station:";select s in 1 1x 2 3 4 5 6 7 "Asian
>>> Network an" "Nations & Local lcl";do break;done;s=($s);mplayer -playlist
>>> "http://www.bbc.co.uk/radio/listen/live/r"${s[@]: -1}".asx";
>>>
>>>
>>> There are much more things on http://www.commandlinefu.com. A must if
>>> you are interested in CLI.
>>>
>>> houghi
>>>
>>>
>> Initially, I thought "Big Deal" and about to blow the post off, but I
>> got interested in the "ss" command and running so many of the commands.
>>
>> Thanks Houghi its a great resource and website, I especially like the
>> way the provide screen shots for most of the commands.
>>
>>
>
>


--
Kind regards, JT