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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Please list email ids or contact info of members moonwalapl Forum Support Area for Unregistered Users & Account Problems 3 05-20-2008 12:45 PM
Using Mailx to send to list of email addresses aguad3 UNIX Desktop for Dummies Questions & Answers 1 03-28-2008 03:40 PM
email file tolkki UNIX for Dummies Questions & Answers 2 03-20-2008 10:03 AM
Creation of output file from list of file ganapati Shell Programming and Scripting 7 01-18-2008 07:55 PM
zip and email a file spalmarez UNIX for Dummies Questions & Answers 4 05-05-2006 01:31 PM

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-29-2007
chengwei chengwei is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 30
How to email a file list

I would like to configure a cronjob to email me a list of files older than 30 days. I'm able to use the find command to ls the files, but not sure how to make it email the file list to me.

Could someone help me get started with this?
  #2 (permalink)  
Old 03-29-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
search the forum please!

this one!
  #3 (permalink)  
Old 03-29-2007
chengwei chengwei is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 30
I don't wish to send a file attachment. I just want to send an email containing the listing of some folders to see the filenames & timestamp.
  #4 (permalink)  
Old 03-29-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
Code:
>cat file
file1 details
file2 details
file3 details
Code:
mail -s "file - details" abc@xyz.com < file
  #5 (permalink)  
Old 04-18-2007
chengwei chengwei is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 30
Managed to get it done. Here's what I did:

Code:
find /path/to -type f -ctime +1 -name "*.log" -print | mailx -s "Log files Listing" "feedback@acme.com"
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 07:55 PM.


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