LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 10: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, 10:41 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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 10:43 AM.
 
Old 01-21-2007, 10: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, 11:04 AM   #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 11:28 AM.
 
Old 01-21-2007, 12: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, 12: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, 12: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, 12: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-21-2007, 11:13 PM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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, 02: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



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 01:56 PM
the meaning of linux(hilarious!) ganja_guru General 52 01-02-2005 01:37 AM
Meaning of Compression level 'dump' command dtournas Linux - General 3 12-31-2004 09:05 PM
Meaning of "shared" in config command tuka Linux - Newbie 0 08-22-2003 10:07 AM
ls command -l Meaning of Colored line mcas Linux - Newbie 3 07-01-2003 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:44 AM.

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
Open Source Consulting | Domain Registration