Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-05-2010, 07:39 AM   #1
LQ Newbie
Registered: Oct 2006
Posts: 12

Rep: Reputation: 0
crontab: 12 3 12 4 4 cat /etc/passwd


If I configure a crontab like below.
12 3 12 4 4 cat /etc/passwd

I know that the cat command will get executed at the configured time. But where will the output of that command go?

If it is something like below, then out put will be routed to /tmp/file1.
12 3 12 4 4 cat /etc/passwd > /tmp/file1

Could any one please help me in understanding this?
Old 01-05-2010, 07:59 AM   #2
LQ Newbie
Registered: Aug 2009
Posts: 6

Rep: Reputation: 11
It should email it to the crontabs owner
Old 01-05-2010, 08:00 AM   #3
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
what's the problem? i don't see your question. output goes in /tmp/file1 and?
to obtain outputs from default mode, you can use mail command after it executes.

Last edited by Web31337; 01-05-2010 at 08:02 AM.
Old 01-05-2010, 08:10 AM   #4
LQ Newbie
Registered: Oct 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for replying.
I have checked the mail of the user. But some times it is not giving mail also.
In some scenarios there will be many mails to that user.In that, I am not able figure out the email which was thrown by crontab.
I am not able to navigate through the list of the mails.
Old 01-05-2010, 08:27 AM   #5
LQ Newbie
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
Praveen, if you want to see the contents of /etc/passwd file on email. Redirect the output of cat /etc/passwd to a temporary file as you did above. Then use the mail/ mailx command to mail this output.
1 members found this post helpful.


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
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 08:15 PM
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 05:20 AM
cat in asm/ cat --show-all option Tux Linux - Software 1 09-02-2006 10:31 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:16 PM.

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