LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2007, 11:33 AM   #1
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Rep: Reputation: 15
linux command, meaning


Hi all, anyone know the meaning of this linux command and what is does pls?thanks in advance.

ps --- efl | grep vm
 
Old 01-21-2007, 11:41 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
It runs the PS command and sends what is found to the GREP command to search wor the word VM.

The symbol that transfers the output of one program to another is called the 'pipe'

Last edited by Wim Sturkenboom; 01-21-2007 at 11:43 AM.
 
Old 01-21-2007, 11:45 AM   #3
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: OpenBSD
Posts: 164
Blog Entries: 1

Rep: Reputation: 30
the ps command firstly shows information about processes and there connected terminals, the e option displays the enviroment and the l option displays information cocerned with uid,pid etc. My man page didnt list the f option. grep just searches through the input ( from the pipe character) and show you stuff concerned with vm.

Mostly guess work, using the man page for ps, probably not right but im sure it makes sense in context for its use. Can i ask why you need to know, im guessing you've been told to type this from somewhere. Someone else could confirm that im right cause i doubt i am
 
Old 01-21-2007, 12:04 PM   #4
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Original Poster
Rep: Reputation: 15
thanks but i dont really get it. e.g. ps - ef |grep processname
is used to show the names of processes running e.g 'zebra is running' etc.I heard of it during my linux labs at UNi and wish to know what it does. In other words what does ps ---efl |grep vm do?

PS. we are working on virtual machines in a linux host...
thanks once again

Last edited by skylimit; 01-21-2007 at 12:28 PM.
 
Old 01-21-2007, 01:01 PM   #5
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
'ps -ef' is show every process on the system using full format according to the manpage. Its output is then piped to grep which returns only the lines containing the string 'vm'.
 
Old 01-21-2007, 01:22 PM   #6
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Original Poster
Rep: Reputation: 15
thanks but in this case i mean ps ---efl | grep vm

is it same?
 
Old 01-21-2007, 01:33 PM   #7
Indiestory
Member
 
Registered: Aug 2006
Location: Aberdeen, Scotland
Distribution: OpenBSD
Posts: 164
Blog Entries: 1

Rep: Reputation: 30
oh that, it gives me ilegal operation and that follows by useage information. That help you? ask your tutor
 
Old 01-21-2007, 01:46 PM   #8
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
I don't think that would be valid usage in any situation. Are you sure that's exactly how you saw it?
 
Old 01-22-2007, 12:13 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
-e > all processes
-f > full format
-l > long format

Play with them and see what they do. The first line after you issued the ps-command tells you what each column is used for.

grep is a search utility to find the given string in it's input. It does not matter where it is. Input can be a file, the keyboard or the output of another command (as in your example).

Your example does not look for a process called 'vm' but for any column containing 'vm'. On my slackware, ps -ef displays the UID as a name (i.e. root, wim). So if a process is owned by a user called 'vm' and I pipe it through grep vm, it will find all processes owned by the user 'vm'. If there's also a process called 'vm', owned by amother user, it will also find that.

@Indiestory:
funny as you run Slackware (according to your profile); I run Slackware 10.1 and all three options are valid.
 
Old 01-22-2007, 03:25 AM   #10
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Original Poster
Rep: Reputation: 15
many thanks guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command meaning ramrann Linux - Newbie 2 10-18-2005 02:56 PM
the meaning of linux(hilarious!) ganja_guru General 52 01-02-2005 02:37 AM
Meaning of Compression level 'dump' command dtournas Linux - General 3 12-31-2004 10:05 PM
Meaning of "shared" in config command tuka Linux - Newbie 0 08-22-2003 11:07 AM
ls command -l Meaning of Colored line mcas Linux - Newbie 3 07-01-2003 04:18 AM


All times are GMT -5. The time now is 02:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration