Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Crontab deleting files command question Post 302802751 by methyl on Saturday 4th of May 2013 05:28:36 PM
Old 05-04-2013
Poster @hanson44 has the correct solution.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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 (7 Replies)
Discussion started by: Relykk
7 Replies

2. UNIX for Dummies Questions & Answers

Deleting files with zero length using ls command

Hi, How can I use ls command to Delete all files with zero length in a given path using ls command (I guess awk is required!)? Thanks. (6 Replies)
Discussion started by: GNMIKE
6 Replies

3. UNIX for Dummies Questions & Answers

file deleting question

somehow one of my directories got a number of files whose names start with a dash - e.g. -1129.txt how can I remove them? If I issue rm -1129.txt I get the message of illegal options if I issue rm /-1129.txt I get a message that -1129.txt is not found Lisa HP-UX 11.23 i64 (3 Replies)
Discussion started by: LisaS
3 Replies

4. Shell Programming and Scripting

command for deleting log files based on some condition

Hello, Can anyone pls. provide me with the command for deleting files older then 15 days with a restriction to keep at least 5 files in a directory even if they are older then 15 days. Any help will be highly appreciated. Thanks, Pulkit (4 Replies)
Discussion started by: pulkit
4 Replies

5. UNIX for Dummies Questions & Answers

Deleting access_log.processed in crontab

Hi, I've worked out that my server was getting clogged with the access_log.processed file. I deleted it using the command > /var/www/vhosts/domain.com/statistics/logs/access_log.processed I also set that up as a crontab job for every Wednesday. What I was wondering is the version using... (4 Replies)
Discussion started by: chickenhouse
4 Replies

6. Shell Programming and Scripting

Deleting files using find command

I want to find the files and delete all the files except the last file. I am using find command , I am sending the find output to a file and getting all the lines except the last one and sending it to the remove command . This is not working. can anyone help me out to do it in the find command... (8 Replies)
Discussion started by: deepaklanka
8 Replies

7. Shell Programming and Scripting

output file of the shell script running through crontab is deleting automatical daily.

Dear Friends, I am working on IBM AIX. I have written one script and kept in the crontab as to run daily at 11:38 AM. and the output of the script to be appended to the file generated with the month name. but my file deleting daily and the new file is creating with the output of the shell... (2 Replies)
Discussion started by: innamuri.ravi
2 Replies

8. Shell Programming and Scripting

Deleting all empty files in sub directories with a command

Hello Friends, Im trying to delete empty files in subdirectories with a command. I can find them checking only one directory in each step and then show them with my command like below moreover i could not add removing part: ls -l */* | awk '{if ($5==0) printf "%3s %2d %s... (5 Replies)
Discussion started by: EAGL€
5 Replies

9. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies

10. Shell Programming and Scripting

Crontab question

I need to run an script every 10th and 25th day in every month at 11pm. the script name is /home/ss/automated.sh I tried to execute the script every day and everytime with the below syntax. its not executing it from crontab. * * * * * /home/ss/automated.sh Any idea why it not... (6 Replies)
Discussion started by: ramkumar15
6 Replies
News::Scan(3pm) 					User Contributed Perl Documentation					   News::Scan(3pm)

NAME
News::Scan - gather and report Usenet newsgroup statistics SYNOPSIS
use News::Scan; my $scan = News::Scan->new; DESCRIPTION
This module provides a class whose objects can be used to gather and report Usenet newsgroup statistics. CONSTRUCTOR
new ( [ OPTIONS ] ) "OPTIONS" is a list of named parameters (i.e. given in key-value pairs). Valid options are Group The value of this option is the name of the newsgroup you wish to scan. From The value of this option should be either 'spool' or 'NNTP' (case is not significant). Any other value will produce an error (see the "error" method description below). A value of 'spool' indicates that you would like to scan articles in a spool (see the Spool option below). A value of 'NNTP' indicates that articles should be retrieved from your NNTP server (see the NNTPServer option below). Spool The value of this option should be the path to the spool directory that contains the articles you would like to scan. This option is ignored unless the value of From is 'spool'. NNTPServer The value of this option (in the form server:port, with both being optional--see Net::NNTP for the semantics of omitting one or both of these parameters) indicates the NNTP server from which to retrieve articles. This option is ignored unless From is 'NNTP'. See the description of the NNTPAuthLogin and NNTPAuthPasswd options below. NNTPAuthLogin The value of this option should be a valid NNTP authentication login for your NNTP server. This option is only necessary if your NNTP server requires authentication. NNTPAuthPasswd The value of this option should be the password corresponding to the login in NNTPAuthLogin. Having this hardcoded in a script is evil, and there should be a much better way. Period The value of this option indicates the length of the period (in days) immediately prior to invocation of the program from which you would like to scan articles. The default period is seven(7) days. QuoteRE The value of this option is a Perl regular expression that accepts quoted lines and rejects unquoted or original lines. The default regular expression is "^s{0,3}(?:"|:|S+>|++)>. Exclude The value of this option should be a reference to an array containing regular expressions that accept email addresses of posters whose articles you wish to ignore. Aliases The value of this option should be a reference to a hash whose keys are email addresses that should be transformed into the email addresses that are their corresponding values, i.e. "alias =" 'real@address'>. METHODS
configure ( [ OPTIONS ] ) "OPTIONS" is a list of named parameters identical to those accepted by "new". Re-"configure"-ing an object after scanning is probably a bad idea. This method returns "undef" if it encounters an error. The following methods are the actual underlying methods used to set and retrieve the configuration options of the same name (modulo case): name ( [ NEWSGROUP-NAME ] ) spool ( [ SPOOL-DIRECTORY ] ) period ( [ INTERVAL-LENGTH ] ) aliases ( [ ALIASES-HASHREF ] ) from ( 'NNTP' | 'spool' ) quote_re ( [ QUOTE-REGEX-ARRAYREF ] ) exclude ( [ EXCLUSION-REGEX-ARRAYREF ] ) nntp_server ( [ [ NNTP-SERVER ]:[ NNTP-PORT ] ] ) nntp_auth_login ( [ LOGIN ] ) nntp_auth_passwd ( [ PASSWORD ] ) These methods can be used to retrieve information from the "News::Scan" object or ask it to perform some action. error ( [ MESSAGE ] ) Use this method to determine whether an object has encountered an error condition. The return value of "error" is guaranteed to be 0 after any method completes successfully (except "error"). (Keep in mind that this will also overwrite any previous error message.) If there has been an error, this method should return some useful message. If provided, "MESSAGE" sets the object's error message. articles Returns the number of articles accounted for. volume Returns the volume of traffic (in bytes) to the newsgroup in the period. header_volume Returns the volume (in bytes) generated by headers. header_lines Returns the number of lines consumed by headers. body_volume Returns the volume (in bytes) generated by message bodies. body_lines Returns the number of lines consumed by message bodies. orig_volume Returns the volume (in bytes) of text which has been determined to be original (see QuoteRE). Note that original traffic is a subset of body traffic. orig_lines Returns the number of lines that are determined to be original. signatures Returns the number of messages that had a cutline (/^-- $/). sig_volume Returns the volume (in bytes) generated by signatures. sig_lines Returns the number of lines consumed by signatures. earliest ( [ TIME ] ) Use this method to determine the date (in seconds since the Epoch) that the oldest article found within the period was posted to Usenet. If "TIME" is given, it is treated as a candidate for the earliest article. If "TIME" is successful (i.e. is less than the previous earliest), this method returns 1, else 0. latest ( [ TIME ] ) Use this method to determine the date (in seconds since the Epoch) that the youngest article found within the period was posted to Usenet. If "TIME" is given, it is treated as a candidate for the latest article. If "TIME" is successful (i.e. is greater than the previous latest), this method returns 1, else 0. excludes Returns the list of regular expressions used to determine whether an article from a given email address should be ignored. posters Returns a reference to a hash whose keys are email addresses and whose values are "News::Scan::Poster" objects corresponding to those email addresses. See News::Scan::Poster. threads Returns a reference to a hash whose keys are subjects and whose values are "News::Scan::Thread" objects corresponding to those subjects. See News::Scan::Thread. crossposts Returns a reference to a hash whose keys are newsgroup names and whose values are the number of times the corresponding groups have been crossposted to. collect Use this method to mirror the articles from the specified NNTP server to the specified spool. Please be kind to the NNTP server. scan Instruct the object to gather information about the newsgroup. EXAMPLES
See the eg/ directory in the News-Scan distribution, available from the CPAN--http://www.perl.com/CPAN/. SEE ALSO
perlre, News::Scan::Poster, News::Scan::Thread, News::Scan::Article, Net::NNTP AUTHOR
Greg Bacon <gbacon@cs.uah.edu> COPYRIGHT
Copyright (c) 1997 Greg Bacon. All Rights Reserved. This library is free software. You may distribute and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-03-29 News::Scan(3pm)
All times are GMT -4. The time now is 02:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy