The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab question blondie2407 HP-UX 12 09-16-2009 01:53 PM
Crontab Question. NycUnxer UNIX for Dummies Questions & Answers 9 11-14-2007 11:53 AM
CRONTAB Question pauls_579 UNIX for Dummies Questions & Answers 2 01-23-2007 05:46 PM
Crontab question ctcuser Shell Programming and Scripting 3 10-19-2006 09:22 AM
crontab question steelrose UNIX for Dummies Questions & Answers 5 10-05-2005 12:07 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-28-2004
Relykk Relykk is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 26
crontab question

I'm trying to create a crontab entry that will run the who command once per hour Monday-Friday. Any command output should be appended to the file whoison.log in my home directory.

This is what I wrote:

crontab 0 * * * 1-5 who >> /home/myhome/whoison.log

Did I do this right?

Thanks
  #2 (permalink)  
Old 03-28-2004
Relykk Relykk is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 26
Yes...No...Maybe? Anyone???
  #3 (permalink)  
Old 03-28-2004
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
that looks fine except you dont need 2 >> only one. ie:

who > yourlogfile.log

learn to be more patient. it was only an hour since you bumped your thread up. and if youve noticed, these boards dont seem to be so busy on sundays....
  #4 (permalink)  
Old 03-28-2004
Relykk Relykk is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 26
Thank you, and I apologize for my impatience.

I thought that << was to append, or is it true only in certain circumstances?
  #5 (permalink)  
Old 03-28-2004
Relykk Relykk is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 26
Oops, I mean >>, sorry.
  #6 (permalink)  
Old 03-28-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Relykk, you're right. >> means append. And since you want to append the output, you need >>.
  #7 (permalink)  
Old 03-28-2004
Relykk Relykk is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 26
Thank you both very much.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0