SHARE
TWEET

Untitled

a guest Jul 12th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ pidof apache2
  2. 31751 31750 31749 31748 31747 31489 31488 31487 31486 31485 1500
  3.      
  4. $ ps aux | grep apache2 | grep -v grep | awk -n '{print $2}'
  5. 1500
  6. 31485
  7. 31486
  8. 31487
  9. 31488
  10. 31489
  11. 31747
  12. 31748
  13. 31749
  14. 31750
  15. 31751
  16.      
  17. $ ps aux | grep apache2 | grep -v grep | awk -n '{printf $2" "}'
  18. 1500 31485 31486 31487 31488 31489 31747 31748 31749 31750 31751
  19.      
  20. $ date +%T:%N; pidof apache2 ;  date +%T:%N
  21. 17:06:05:627088798
  22. 31751 31750 31749 31748 31747 31489 31488 31487 31486 31485 1500
  23. 17:06:05:634500908
  24.  
  25. $ date +%T:%N; ps aux | grep apache2 | grep -v grep | awk -n '{printf $2" "}' ;  date +%T:%N
  26. 17:06:29:887314682
  27. 1500 31485 31486 31487 31488 31489 31747 31748 31749 31750 31751
  28. 17:06:29:903997288
  29.      
  30. $ ps aux | grep apache2 | grep -v grep | awk -n '{print $2}' | sort -rn
  31. 31751
  32. 31750
  33. 31749
  34. 31748
  35. 31747
  36. 31489
  37. 31488
  38. 31487
  39. 31486
  40. 31485
  41. 1500
  42.      
  43. $ ps ax | grep firefox
  44. 8621 ??  S       5:20.24 firefox
  45. 10409 p3  R+      0:00.00 grep firefox
  46.      
  47. $ ps -ef | pgrep login
  48. 102
  49. 103
  50. 6245
  51. 6361
  52.      
  53. $ ps -ef | pgrep login | sort -rn
  54. 6361
  55. 6245
  56. 103
  57. 102
  58.      
  59. $ ps -ef | pgrep login | sort -rn | head -n 1
  60. 6361
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top