PS -ef ??


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers PS -ef ??
# 1  
Old 12-28-2011
PS -ef ??

Smilie How do you list all processes started in the last 24 hours, using one command? This is for Linux
# 2  
Old 12-28-2011
You could try
Code:
ps -ef|grep ":..:"

This will get all lines matching the search and therefore any processes over 24Hr (which then show just a date for the start column) will be eliminated, unless there is some other reason to match them, i.e. the command string matches it.


I hope that this helps,


Robin
Liverpool/Blackburn
UK
# 3  
Old 12-28-2011
Thanks for your help. The only problem with that command is that it lists everything. I need a command that only lists processes started less than 24 hours ago. Do you have an idea how I would do that?

Last edited by paris123; 12-28-2011 at 11:48 AM.. Reason: Making correction
# 4  
Old 12-28-2011
Please post a sample of your "ps -ef" output which shows some processes which you want to see ... and some which you do not want to see.


Btw. The "grep" from rbatte1 works on my system.
# 5  
Old 12-28-2011
I don't want to see the date. I want just the time:

I want to just see:
Code:
07:53 ?        
07:53 ?       
08:51 ?        
08:51        
09:56      
09:56

I do not want to see:
Code:
Sep14
Oct13
Nov14
Dec05

I hope this helps!

Last edited by methyl; 12-28-2011 at 12:01 PM.. Reason: please use code tags
# 6  
Old 12-28-2011
Sorry but I do not believe that your "ps -ef" outputs dates in that format.
Please can you post some complete output lines (in code tags) taking special care to preserve any spacing.

Also it's time we knew what Operating System this is (blotting anything confidential like machine names and licence numbers):
Code:
# Operating System
uname -a
# Local settings
locale

# 7  
Old 12-28-2011
STIME is the field, does that help?

---------- Post updated at 11:08 AM ---------- Previous update was at 11:06 AM ----------

The uname -a results:
Linux XX-XXXXXX-XX 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 ixxx ixxx ixxx GNU/Linux

Local Settings:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question