Linux PID to obtain accurate

2010-07-15  来源:本站原创  分类:OS  人气:158 

If you want to script only for PID, you can use the following script.

ps x | grep xxx | awk '(print $ 1)'

Notes:

1, xxx for the implementation of the command name

2, for example, to obtain the current user process under the java】 【pid

[Admin @ vm168a ~] $ ps x | grep java | awk '(print $ 1)'
16920

3, use three commands, ps, grep, awk.

相关文章
  • Linux PID to obtain accurate 2010-07-15

    If you want to script only for PID, you can use the following script. ps x | grep xxx | awk '(print $ 1)' Notes: 1, xxx for the implementation of the command name 2, for example, to obtain the current user process under the java] [pid [Admin @ vm168a

  • Android Linux system to obtain permission to add or remove files 2010-11-03

    mount -o remount rw / # Or directly in your system : adb shell mount -o remount rw /

  • [Transfer] linux boot 2010-11-02

    ------- Learning Linux, colleagues conclude, perhaps from the linux boot process can be seen that the Linux development process; Prehistoric times: BIOS-computer boot process Power supply power, motherboard chipset thick hair like CPU RESET signal, t

  • How friendly the process of monitoring and management of Linux 2010-11-11

    Doing video encoding and decoding process, you need to fork a child process called transcoding tools to do encode, that there needs to be well controlled process, so that the process is similar to running in the hourglass inside, safe, controlled ope

  • Linux operating system to install and configure the Ethernet card 2010-12-15

    Abstract With the Linux operating system is increasingly being accepted by people, how to expand the network applications on the Linux system has increasingly become issues of concern. This paper discusses the work as a network card installation and

  • JavaScript event bubbling demo 2008-12-23

    Reproduced: If you do not understand the JavaScript event bubbling down to see: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:/

  • [Project Summary] Agile My Opinion 2010-02-04

    In fact, said to be agile that we are not agile. In some ways, agile divided into three parts: the agile software management, agile requirements analysis, agile software development. Agile Project Management: Agile software management, is a very flex

  • T-shirt printing in color characteristics of 2010-02-18

    Keyword: Whether color management technology in the garment screen printing place? General work clothes printing name "Color Management" has nothing to do with their own feel. They think that after all is the large-format color management in ter

  • PS based learning: Photoshop skills 167 2010-04-22

    PS based learning: Photoshop skills, Photoshop skills of 167 classic Daquan, if you are the level of the initial stage, familiar with the text and to master, immediately advanced to intermediate level. Oh definitely not advertising. Common techniques

  • GPS.GIS full overview 2010-07-11

    GPS global positioning system called the Global Position System begins with the letter of the abbreviation. It is the United States from the development of the 70s and lasted 20 years, cost nearly 20 billion U.S. dollars, fully completed in 1994, the

  • Get users IP address differences between the three attributes and the access to IP method CakePHP 2010-08-18

    Want to obtain the ip is not difficult, but to obtain accurate ip is indeed worthy of exploration. In the proxy, transparent proxy, anonymous proxy and the proxy server so deceptive circumstances, access to the client IP when the judge needs to be do

  • android in the running tasks and services 2010-08-24

    Sample Description Android operating system does not provide the Task Manager program, no way of knowing what the background program is running. This example is the way to get through ActivityManager.getRunningTasks work processes are running, and us

  • Chapter Development Methods 2010-10-04

    A software life cycle 1,. Feasibility Study and Plan 2. Requirements Analysis 3. Outline design 4. Detailed Design 5. To achieve 6. Integration testing 7. Validation testing 8. Use and maintenance Second, software development model Waterfall Model 1

  • Precision float type conversion JS settlement (reposted) 2010-11-19

    Questions like this: 37.5 * 5.5 = 206.08 (JS calculated that such a result, I rounded to two decimal places) I first suspected the problem of rounding to a direct result of calculations using JS: 206.08499999999998 How can it be only one of two multi

  • LoaderMax use of guidance 2010-12-22

    1, SWFLoader and ImageLoader the content and rawContent What's the difference? content attribute is included to obtain the true content of the container, and rawContent load content obtained is true. A major reason to do so in the real contents of th

  • Case study of traditional search marketing industry 2011-05-30

    First, the industry choice. This is important, the education sector is relatively small legal risk, capital concentration is more dependent on marketing, traditional advertising is the main concentration of industry. Education industry is now promoti

  • How to Software Requirements Analysis 2011-05-31

    Definition of requirements from the user point of view (the system's external behavior), and from developer perspective (some internal features) to address needs. The key question is that we must prepare requirements documents. I have witnessed the m

  • How the software requirements analysis 2011-02-14

    Definition of requirements from the user point of view (the system's external behavior), and from the developers point of view (some internal features) to elaborate requirements. The key issue is that we must prepare requirements documents. I had wit

  • How Software Requirements Analysis 2011-08-05

    How Software Requirements Analysis Definition of requirements from the user point of view (the system's external behavior), and from developer perspective (some internal features) to elaborate requirements. The key question is sure to write requireme

  • android核心基础(5)_Android)java虚拟机和Dalvik虚拟机的区别 2013-08-18

    Google于2007年底正式发布了 Android SDK, 作为 Android系统的重要特性,Dalvik虚拟机也第一次进入了人们的视野.它对内存的高效使用,和在低速CPU上表现出的高性能,确实令人刮目相看. 依赖于底层Posix兼容的操作系统,它可以简单的完成进程隔离和线程管理.每一个Android应用在底层都会对应一个独立的Dalvik虚拟机实例, 其代码在虚拟机的解释下得以执行. 很多人认为Dalvik虚拟机是一个Java虚拟机,因为Android的编程语言恰恰就是Java语言.但是