From b5408a18d4ce734b25e52f3aa986265c4abf463d Mon Sep 17 00:00:00 2001 From: Chirag Date: Sat, 1 Mar 2014 11:36:58 +0530 Subject: [PATCH 1/3] Updating pgrep page Added parameters for searching by user and searching by complete command with parameters --- common/pgrep.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/pgrep.md b/common/pgrep.md index 497c11c1c0..c208d28033 100644 --- a/common/pgrep.md +++ b/common/pgrep.md @@ -10,6 +10,14 @@ `pgrep -i {{fireFOx}}` +- search full command line with parameters instead of just the process name + +`pgrep -f {{ssh root}}` + +- search for process run by a specific user + +`pgrep -u root {{firefox}}` + - kill all processes which match `pkill -9 {{Finder}}` From a35006fece081cc9f6097e4b197e84d3794a0b8f Mon Sep 17 00:00:00 2001 From: Chirag Date: Sat, 1 Mar 2014 11:46:48 +0530 Subject: [PATCH 2/3] Corrected SSH parameter Port number parameter is a p, not a capital P --- common/ssh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/ssh.md b/common/ssh.md index 880268e178..d4cb6eab8f 100644 --- a/common/ssh.md +++ b/common/ssh.md @@ -9,7 +9,7 @@ - connecting to a remote server with specific port -`ssh {{username}}@{{remote_host}} -P {{2222}}` +`ssh {{username}}@{{remote_host}} -p {{2222}}` - run a command on a remote server From 660fb0958e2a02670918dc78efe6e69fad9546c0 Mon Sep 17 00:00:00 2001 From: Chirag Date: Sat, 1 Mar 2014 11:48:14 +0530 Subject: [PATCH 3/3] Minor correction Command with parameters need to be in double-quotes --- common/pgrep.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pgrep.md b/common/pgrep.md index c208d28033..c82b856c49 100644 --- a/common/pgrep.md +++ b/common/pgrep.md @@ -12,7 +12,7 @@ - search full command line with parameters instead of just the process name -`pgrep -f {{ssh root}}` +`pgrep -f "{{ssh root}}"` - search for process run by a specific user