xarg examples

 ymmv - check your local man pages for syntax and options

In trying to determine how to kill off processes created by an application quickly, I came up with the following command that seems to work...

BEFORE using xargs to kill an application, test it as follows

ps -ef | grep ptc ps -ef | grep ptc | xargs echo `awk '{print $2 }'` verify that the pid's listed in the first command match the pid's in the second. If more shows up then the specific application, then you want to be more specific, test until only the processes you wish to terminate are listed.

the use of xargs with the kill command

to kill off all processes associated with "ptc": ps -ef | grep ptc | xargs kill -9 `awk '{print $2 }'`
to kill off all processes associated with "oli": ps -ef | grep oli | xargs kill -9 `awk '{print $2 }'`
to kill off all processes associated with "etscape": ps -ef | grep etscape | xargs kill -9 `awk '{print $2 }'`

xargs

USING xargs in a korn shell with Services for UNIX.  

according to  http://www.linux.com/article.pl?sid=04/04/13/211209 one should use the -n1 option,
this should feed one input at a time... however, it didn't work in SFU 3.5.

find /dev/fs/H/ARCHIVE/ -type f -name *.jpg -print | xargs -nl -i cp {} /dev/fs/H/ALL-PIX 

WHAT WORKED:

find /dev/fs/H/ARCHIVE/ -type f -name *.jpg -print | xargs -i cp {} /dev/fs/H/ALL-PIX 


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)

JohnMeister.com Today's Date:

Simply Linux: Basics Using BASH on Windows 10
Practical Suggestions for Microsoft Windows
Linux Tackles Microsoft  Full Size Jeep Buyer's Guide
Video Course:
The Art of Linux System Administration, and a
Study Guide for the LPIC-2 Certification Exams.

-- O'Reilly Media author info
FULL SIZE JEEP

Buyer's Guide

SJ Jeeps

"Jeep is America's
only real sports car."
-Enzo Ferrari


Mercedes, VW, and other Diesels
Nikon cameras
general tech info
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983

purchase AMSOIL and have it
installed locally in WA at:

- Northland Diesel 360.676.1970 - Bellingham
- Midway Auto 360.668.7111 - Clearview/Snohomish
- Fleet Services 425.355.4440 - Everett