Sponsored Content
Top Forums Shell Programming and Scripting Script to find and email selected files Post 302497282 by rdcwayx on Wednesday 16th of February 2011 07:17:34 PM
Old 02-16-2011
you need send these files by attach in mail, or just send the file name to mail?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove files other than selected

I wanna remove a set files other than some selected files. Eg. :rolleyes::rolleyes::rolleyes: a directory contains n files like test1.dat test2.dat test3.dat test4.dat out5.dat out1.dat i wanna remove all files which doesnot name like *test* I want to use this in shell... (22 Replies)
Discussion started by: freakygs
22 Replies

2. Shell Programming and Scripting

Script to find, grep and email

running a suse linux 10. I'm trying to write a script that searches for a file with certain name and that has been modified less than 30 minutes ago, then search for a certain string in that file and email this string out. I have tried different combinations of find, grep and email but no luck... (7 Replies)
Discussion started by: basisvasis
7 Replies

3. Shell Programming and Scripting

Running a command on multiple selected files in nautilus script

I am trying to make a script to convert drg files to wav and so far i have this #!/bin/bash drg2sbg "$*" -o "$*".sbg sbagen -Wo "/home/nick/Desktop/I-Doser Wave Files/"$*"" "$*".sbg rm "$*".sbg cd "/home/nick/Desktop/I-Doser Wave Files" rename 's/\.drg$/\.wav/' *.drg exit the drg2sbg and... (2 Replies)
Discussion started by: Nickbowlingdude
2 Replies

4. Shell Programming and Scripting

Script to place selected columns from a group of files side by side in a new file

Hi Everyone, I need a shell/perl script to bring selected columns from all the files located in a directory and place them in a new file side by side. File1: a b c d 2 3 4 5 f g h i .......... File2: I II III IV w x y z .............. and so on many files are there...... (8 Replies)
Discussion started by: ks_reddy
8 Replies

5. UNIX for Dummies Questions & Answers

Find & Copy Selected files to another Directory

I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help. Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
Discussion started by: hellfyre
3 Replies

6. Shell Programming and Scripting

Need to find occurrences of email domains in all files in a directory

Hello Everyone! I trust you are off to a great week! Trying to output the name and count of each uniquely occurring domain in the current directory for a portion of a script I'm building. Here's what I'm stuck on: - Need to find UNIQUE occurences of domains (*@domain.com) in ALL files in... (4 Replies)
Discussion started by: linuxhombre
4 Replies

7. Shell Programming and Scripting

trying to print selected fields of selected lines by AWK

I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by awk 'NR==29,NR==10029' File1 > File2 and then doing awk '{print $1, $2, $13, $14}' File2 > File3 Can... (3 Replies)
Discussion started by: ananyob
3 Replies

8. Shell Programming and Scripting

Script to find string & email

Hi I have a query that some of you may be able to help me with if poss? I'd appreciate it very much. I've got a few log files, that I would like to search for a string. When the string is found, i'd then like to email out the line/sting. If not found, i'd like to email out 'no found'... (2 Replies)
Discussion started by: horhif
2 Replies

9. SCO

Using FIND but ignoring selected folders

This may be ludicrously easy to most people, but I've been scratching my head today trying to do it. I'm archiving data on a OpenServer 5.0.6a box using a combination of FIND, CPIO and BZIP2. What I'd like to do is archive a range of folders, but ignore some. For instance, if I have 5... (1 Reply)
Discussion started by: mmcardle
1 Replies

10. Shell Programming and Scripting

Find key pattern and print selected lines for each record

Hi, I need help on a complicated file that I am working on. I wanted to extract important info from a very huge file. It is space delimited file. I have hundred thousands of records in this file. An example content of the inputfile as below:- ## ID Ser402 Old; 23... (2 Replies)
Discussion started by: redse171
2 Replies
CHANGETRACK(1)						      General Commands Manual						    CHANGETRACK(1)

NAME
changetrack - track changes to files SYNOPSIS
changetrack [-h] [-c configfile] [-d directory] [-e] [-r] [-q] [-m message] [-M message] [-v] [-u] [-o toaddress] [-f fromaddress] DESCRIPTION
changetrack is a program to monitor changes to a bunch of files. If files are modified one day, and the machine starts working incorrectly some days later, changetrack can provide information on which files were modified, and help locate the problem. Normally changetrack uses ed to keep track of various revisions of the files by maintaining an .ed script with the change history for each file. Alternatively, changetrack can use rcs to keep track of various revisions of the files. Each file is "installed" in the rcs system the first time that changetrack is run after that file is added to the config file. Whenever changetrack is run after that, a copy of the file is made, which is 'checked in' and implicitly 'checked out' of the rcs system. See the man page of co for information on retrieving an old version of the file. Backup files (ending in tilde ~) are ignored, unless explicitely included. After each pattern in the file list, adding white space, a colon (:) then more whitespace, followed by email addresses, separated by more whitespace, will result in the changes to that file being emailed to that address. All changes from each run are expressed in one email. Using the email feature requires Mail::SendMail to be installed; if it does not work correctly, an error message will be printed to stan- dard error. OPTIONS
-h Display a short help message then exit. -cconfigfile Get the list of files to track from configfile instead of from ~/.changetrackrc (/etc/changetrack.conf for the super-user) -doutputdirectory Store output in outputdirectory instead of in ~/.changetrack/ (/var/lib/changetrack/ for the super-user) -e Keep a copy of the file from when it was first added to the changetrack configuration, and keep ed -styled changes to rebuild the file. This option is recommended only if rcs does not work on the machine. To recover using this means, the .ed file should have the last several commands removed, to allow the file to be rebuilt to the appropriate state. A command like 'cat myfile.ed | ed myfile.original' should be executed. -r Disable the rcs facility. -q Quiet mode; only print critical messages. Good for scripts. -mmessage Print message on each file, after checking for any changes. Good for indicating reboots or other system events. -Mmessage Like -m, but message is only printed on modified files. -v Print version and exit. -u Use unified diffs (this only works with some implementations of diff. -oemailaddress Mail output to emailaddress. This is supplementary to emails specified in the config file. -femailaddress Set "From" header to emailaddress, which must be fully qualified. REQUIREMENTS
This program requires diff. Unless the -r switch is used, this program requires rcs to be installed. If the -e switch is used, ed is required. FILES
~/.changetrackrc List of files to monitor. Each line may start with '#' indicating a comment. If a line is not a comment, it contains a file/pattern to monitor, and optionally " : " followed by any email addresses to send changes to. The filename may be a pattern described in the same way as for ls. Note: the default is /etc/changetrack.conf for root. ~/.changetrack/ Default directory in which to store output information. The default is /var/lib/changetrack/ for root. All rcs files are stored in this directory, unless a subdirectory called RCS exists, in which case the rcs files are stored in that directory. /etc/cron.daily/changetrack Script that creates the list of all files monitor. /etc/cron.hourly/changetrack Script that invocates changetrack. /etc/default/changetrack Configuration for the above two scripts. DIAGNOSTICS
Each filename is written to standard output. rcs will print errors if certain things go wrong. It will also print a few lines each time changetrack is run after a new file is added to the configuration. IDENTIFICATION
Author: Cameron J. Morland. Manual Page Revision: 2.1 Release Date: 2001-03-06. Copyright (C) 2001-2005 Cameron J. Morland. Changed by Jens Peter Secher to reflect the Debian modifications. SEE ALSO
ed(1), rcsintro(1), co(1) TODO
Automate removal of out-of-date changes, to save disk space and clarify the important changes. BUGS
None known. CHANGETRACK(1)
All times are GMT -4. The time now is 11:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy