But it is only getting files older than 365 for /home directory but not next and i want to the log file to be generated for each directory.. so pleas ehelp.
Last edited by Scrutinizer; 02-27-2015 at 03:10 AM..
Reason: code tags
Hi Frends,
I am need of a small shell script. Kindly any body help me by giving me a small shell script to read first line in a file and extract date from the first line
and store it in a variable...
and after storing it in a variable the first and the last line of the file has to be deleted..... (2 Replies)
Hi i dont know about the UNIX OS at all but now as my Project requires, i need to learn it as soon as possible.
Could anybody please help me out in suggessting any good elementary book on UNIX OS so that atleast i can learn the commands for UNIX servers and at the same time within the short span... (3 Replies)
hi to all
i have file like this
file.txt
this is naryana expect
hyderabad is a cool place
now climate VISAKHSAPATNAM became very cool
#vizag is my birth place
#hyderabad is a cool place
#now climate of hyd became very cool
#vizag is my birth place
#hyderabad is a cool place ... (7 Replies)
Hi to All,
I m a regular visitor of this site but this one is my first thread .
Although I ve tried but I cant find the solution .:confused:
I ve number of files having extension .file., which having some define statement in it.The files consits as follows
Ex:-
abc.file
`define ADCONV0 ... (3 Replies)
Ih all,
i have multiples ksh scripts for crontab's unix jobs
they all have same variables declarations and some similar functions
i would have a only single script file to declare my variables, like:
var1= "aaa"
var2= "bbb"
var3= "ccc"
...
function ab { ...}
function bc { ... }... (2 Replies)
Hi
I have knowledge is a little about Solaris 10.
I have problem route
Question
I have two lan interfaces
nge0 >> 192.168.1.1 / 24 and link up Client1 >> 192.168.1.10 not out internet (GW 192.168.1.254)
nge1 >> 192.168.50.220 /24 and link up Client50 >> 192.168.50.1 can... (2 Replies)
I am new to shell scripting
I am getting file sample.txt from mainframes to my unix machine Mon-Fri every 15 minutes from 9:00AM to 6:00PM.
I need to Compare timestamp of sample.txt against system time via a Unix script kicked off by an Autosys job
My Task is to write a shell script to monitor... (3 Replies)
I have added script command to the .profile of the id, whose session needs to be captured. When exit command is issued, the script command exits.
Is there a way to exit the parent shell also - and log off the system completely with one exit command? (8 Replies)
Hi
I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email.
For example
-------
Script ABC
-------
a.ksh
b.ksh
c.ksh
I need to call all three scripts execute them and... (2 Replies)
hello all,
I have a script, used to search for the strings from the set of 5 similar pattern file from the log dir. So here it goes . The input parameter is a part of the file name. When during the script execution, the script should parse the input parameter to original file's with the same... (1 Reply)
Discussion started by: raghunsi
1 Replies
LEARN ABOUT PHP
faxcron
FAXCRON(8) System Manager's Manual FAXCRON(8)NAME
faxcron - HylaFAX routine maintenance script
SYNOPSIS
/usr/sbin/faxcron [ -n ] [ -l lastrun ]
DESCRIPTION
faxcron is a command script that does routine upkeep tasks in a HylaFAX spooling directory hierarchy. This script is intended to be
invoked from cron(8) on behalf of the fax user (often the ``fax'' user is uucp) once a day, with the standard output sent by mail to the
HylaFAX administrator. For example, the following crontab might be set up for the fax user:
25 23 * * * sh /usr/sbin/faxcron | mail FaxMaster
The faxcron script does the following work:
o report statistics for facsimile transmitted since the last time faxcron was run.
o report statistics for facsimile transmitted in the past week.
o report statistics for facsimile received since the last time faxcron was run.
o report statistics for facsimile received in the past week.
o report any recent calls that failed suspiciously and return the associated trace log;
o purge data that is 30 days or older from the remote machine information directory;
o delete information that is 30 days or older from session trace log files;
o remove files from the tmp directory that are older than 1 day;
o remove files in the received facsimile queue that are 7 days or older;
o report sites that are currently having jobs rejected; and
o force all session log files to be owned by the fax user and kept with protection mode 644.
OPTIONS -n Forces faxcron to run without updating any files.
-l lastrun
Forces the notion of the last time that faxcron was run to be lastrun. The value of lastrun is a date and time string of the
form ``MM/DD/YY HH:MM'' (the date(1) format string ``%D %H:%M'').
-info n Set the expiration time for data in the info database to be n days.
-log n Set the expiration time for session log data to be n days.
-rcv n Set the expiration time for files in the received facsimile queue to be n days.
-tmp n Set the expiration time for files in the tmp directory to be n days.
-mode m Set the file protection mode for session logs to m (a command line argument to chmod(1)).
NOTES
This script requires nawk(1) or gawk(1) and a date (1) program that supports the ``+format'' option.
If session logs are to be kept private this script must be modified to filter out sensitive information such as calling card numbers. (It
should also be run with ``-mode 0600'' so that session log files are not publicly readable.)
FILES
/var/spool/hylafax spooling area
/var/spool/hylafax/status/lastrun timestamp of last run
/usr/sbin/xferfaxstats for generating transmit statistics
/usr/sbin/recvstats for generating receive statistics
/var/spool/hylafax/tmp/faxcronXXXX temporary file for truncating session logs
/var/spool/hylafax/tmp/faxlogXXXX temporary file for logs of failed calls
SEE ALSO cron(8), faxq(8), faxgetty(8), faxsend(8), xferfaxstats(8), recvstats(8), hylafax-server(5)
May 12, 1996 FAXCRON(8)